@datapos/datapos-development 0.3.141 → 0.3.142
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/datapos-development.es.js +509 -500
- package/package.json +1 -1
|
@@ -3,8 +3,8 @@ import { promises as B } from "node:fs";
|
|
|
3
3
|
import { nanoid as Ln } from "nanoid";
|
|
4
4
|
import { promisify as Pn } from "node:util";
|
|
5
5
|
function Vn(e, t, i, n, u) {
|
|
6
|
-
i || (i = b), (function s(o, a,
|
|
7
|
-
var f =
|
|
6
|
+
i || (i = b), (function s(o, a, r) {
|
|
7
|
+
var f = r || o.type;
|
|
8
8
|
i[f](o, a, s), t[f] && t[f](o, a);
|
|
9
9
|
})(e, n, u);
|
|
10
10
|
}
|
|
@@ -141,8 +141,8 @@ b.TemplateLiteral = function(e, t, i) {
|
|
|
141
141
|
i(s, t);
|
|
142
142
|
}
|
|
143
143
|
for (var o = 0, a = e.expressions; o < a.length; o += 1) {
|
|
144
|
-
var
|
|
145
|
-
i(
|
|
144
|
+
var r = a[o];
|
|
145
|
+
i(r, t, "Expression");
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
b.TemplateElement = xe;
|
|
@@ -903,7 +903,7 @@ class M extends SyntaxError {
|
|
|
903
903
|
loc;
|
|
904
904
|
description;
|
|
905
905
|
constructor(t, i, n, ...u) {
|
|
906
|
-
const s = Jn[n].replace(/%(\d+)/g, (a,
|
|
906
|
+
const s = Jn[n].replace(/%(\d+)/g, (a, r) => u[r]), o = "[" + t.line + ":" + t.column + "-" + i.line + ":" + i.column + "]: " + s;
|
|
907
907
|
super(o), this.start = t.index, this.end = i.index, this.range = [t.index, i.index], this.loc = {
|
|
908
908
|
start: { line: t.line, column: t.column },
|
|
909
909
|
end: { line: i.line, column: i.column }
|
|
@@ -1175,7 +1175,7 @@ function Wn(e) {
|
|
|
1175
1175
|
return (I[s] & 64) === 0 && e.report(7), t = Y(i) << 12 | Y(n) << 8 | Y(u) << 4 | Y(s), e.currentChar = e.source.charCodeAt(e.index += 4), e.column += 4, t;
|
|
1176
1176
|
}
|
|
1177
1177
|
function ri(e, t, i) {
|
|
1178
|
-
let n = e.currentChar, u = 0, s = 9, o = i & 64 ? 0 : 1, a = 0,
|
|
1178
|
+
let n = e.currentChar, u = 0, s = 9, o = i & 64 ? 0 : 1, a = 0, r = 0;
|
|
1179
1179
|
if (i & 64)
|
|
1180
1180
|
u = "." + Ye(e, n), n = e.currentChar, n === 110 && e.report(12);
|
|
1181
1181
|
else {
|
|
@@ -1183,30 +1183,30 @@ function ri(e, t, i) {
|
|
|
1183
1183
|
if (n = g(e), (n | 32) === 120) {
|
|
1184
1184
|
for (i = 136, n = g(e); I[n] & 4160; ) {
|
|
1185
1185
|
if (n === 95) {
|
|
1186
|
-
|
|
1186
|
+
r || e.report(152), r = 0, n = g(e);
|
|
1187
1187
|
continue;
|
|
1188
1188
|
}
|
|
1189
|
-
|
|
1189
|
+
r = 1, u = u * 16 + Y(n), a++, n = g(e);
|
|
1190
1190
|
}
|
|
1191
|
-
(a === 0 || !
|
|
1191
|
+
(a === 0 || !r) && e.report(a === 0 ? 21 : 153);
|
|
1192
1192
|
} else if ((n | 32) === 111) {
|
|
1193
1193
|
for (i = 132, n = g(e); I[n] & 4128; ) {
|
|
1194
1194
|
if (n === 95) {
|
|
1195
|
-
|
|
1195
|
+
r || e.report(152), r = 0, n = g(e);
|
|
1196
1196
|
continue;
|
|
1197
1197
|
}
|
|
1198
|
-
|
|
1198
|
+
r = 1, u = u * 8 + (n - 48), a++, n = g(e);
|
|
1199
1199
|
}
|
|
1200
|
-
(a === 0 || !
|
|
1200
|
+
(a === 0 || !r) && e.report(a === 0 ? 0 : 153);
|
|
1201
1201
|
} else if ((n | 32) === 98) {
|
|
1202
1202
|
for (i = 130, n = g(e); I[n] & 4224; ) {
|
|
1203
1203
|
if (n === 95) {
|
|
1204
|
-
|
|
1204
|
+
r || e.report(152), r = 0, n = g(e);
|
|
1205
1205
|
continue;
|
|
1206
1206
|
}
|
|
1207
|
-
|
|
1207
|
+
r = 1, u = u * 2 + (n - 48), a++, n = g(e);
|
|
1208
1208
|
}
|
|
1209
|
-
(a === 0 || !
|
|
1209
|
+
(a === 0 || !r) && e.report(a === 0 ? 0 : 153);
|
|
1210
1210
|
} else if (I[n] & 32)
|
|
1211
1211
|
for (t & 1 && e.report(1), i = 1; I[n] & 16; ) {
|
|
1212
1212
|
if (I[n] & 512) {
|
|
@@ -1222,12 +1222,12 @@ function ri(e, t, i) {
|
|
|
1222
1222
|
if (n === 95) {
|
|
1223
1223
|
if (n = g(e), n === 95 || i & 32)
|
|
1224
1224
|
throw new M(e.currentLocation, { index: e.index + 1, line: e.line, column: e.column }, 152);
|
|
1225
|
-
|
|
1225
|
+
r = 1;
|
|
1226
1226
|
continue;
|
|
1227
1227
|
}
|
|
1228
|
-
|
|
1228
|
+
r = 0, u = 10 * u + (n - 48), n = g(e), --s;
|
|
1229
1229
|
}
|
|
1230
|
-
if (
|
|
1230
|
+
if (r)
|
|
1231
1231
|
throw new M(e.currentLocation, { index: e.index + 1, line: e.line, column: e.column }, 153);
|
|
1232
1232
|
if (s >= 0 && !nt(n) && n !== 46)
|
|
1233
1233
|
return e.tokenValue = u, e.options.raw && (e.tokenRaw = e.source.slice(e.tokenIndex, e.index)), 134283266;
|
|
@@ -1330,8 +1330,8 @@ function Xn(e) {
|
|
|
1330
1330
|
}
|
|
1331
1331
|
s = g(e);
|
|
1332
1332
|
}
|
|
1333
|
-
const a = e.source.slice(o, e.index),
|
|
1334
|
-
return e.tokenRegExp = { pattern:
|
|
1333
|
+
const a = e.source.slice(o, e.index), r = e.source.slice(t, n);
|
|
1334
|
+
return e.tokenRegExp = { pattern: r, flags: a }, e.options.raw && (e.tokenRaw = e.source.slice(e.tokenIndex, e.index)), e.tokenValue = $n(e, r, a), 65540;
|
|
1335
1335
|
}
|
|
1336
1336
|
function $n(e, t, i) {
|
|
1337
1337
|
try {
|
|
@@ -1400,8 +1400,8 @@ function Ei(e, t, i, n = 0) {
|
|
|
1400
1400
|
if (t & 1 || n)
|
|
1401
1401
|
return -2;
|
|
1402
1402
|
if (e.currentChar = a, u = u << 3 | a - 48, s++, o++, s < e.end) {
|
|
1403
|
-
const
|
|
1404
|
-
I[
|
|
1403
|
+
const r = e.source.charCodeAt(s);
|
|
1404
|
+
I[r] & 32 && (e.currentChar = r, u = u << 3 | r - 48, s++, o++);
|
|
1405
1405
|
}
|
|
1406
1406
|
e.flags |= 64;
|
|
1407
1407
|
}
|
|
@@ -1488,11 +1488,11 @@ function xi(e, t) {
|
|
|
1488
1488
|
if (s = g(e), s > 126)
|
|
1489
1489
|
u += String.fromCodePoint(s);
|
|
1490
1490
|
else {
|
|
1491
|
-
const { index: o, line: a, column:
|
|
1491
|
+
const { index: o, line: a, column: r } = e, f = Ei(e, t | 1, s, 1);
|
|
1492
1492
|
if (f >= 0)
|
|
1493
1493
|
u += String.fromCodePoint(f);
|
|
1494
1494
|
else if (f !== -1 && t & 64) {
|
|
1495
|
-
e.index = o, e.line = a, e.column =
|
|
1495
|
+
e.index = o, e.line = a, e.column = r, u = null, s = Qn(e, s), s < 0 && (n = 67174408);
|
|
1496
1496
|
break;
|
|
1497
1497
|
} else
|
|
1498
1498
|
Di(e, f, 1);
|
|
@@ -1708,8 +1708,8 @@ function Ti(e, t, i) {
|
|
|
1708
1708
|
if (a === 61)
|
|
1709
1709
|
return g(e), 8390718;
|
|
1710
1710
|
if (a === 33) {
|
|
1711
|
-
const
|
|
1712
|
-
if (
|
|
1711
|
+
const r = e.index + 1;
|
|
1712
|
+
if (r + 1 < e.end && u.charCodeAt(r) === 45 && u.charCodeAt(r + 1) == 45) {
|
|
1713
1713
|
e.column += 3, e.currentChar = u.charCodeAt(e.index += 3), i = oi(e, u, i, t, 2, e.tokenStart);
|
|
1714
1714
|
continue;
|
|
1715
1715
|
}
|
|
@@ -1775,8 +1775,8 @@ function Ti(e, t, i) {
|
|
|
1775
1775
|
if (a >= 48 && a <= 57)
|
|
1776
1776
|
return ri(e, t, 80);
|
|
1777
1777
|
if (a === 46) {
|
|
1778
|
-
const
|
|
1779
|
-
if (
|
|
1778
|
+
const r = e.index + 1;
|
|
1779
|
+
if (r < e.end && u.charCodeAt(r) === 46)
|
|
1780
1780
|
return e.column += 2, e.currentChar = u.charCodeAt(e.index += 2), 14;
|
|
1781
1781
|
}
|
|
1782
1782
|
return 67108877;
|
|
@@ -1794,10 +1794,10 @@ function Ti(e, t, i) {
|
|
|
1794
1794
|
if (a !== 62)
|
|
1795
1795
|
return 8390721;
|
|
1796
1796
|
if (g(e), e.index < e.end) {
|
|
1797
|
-
const
|
|
1798
|
-
if (
|
|
1797
|
+
const r = e.currentChar;
|
|
1798
|
+
if (r === 62)
|
|
1799
1799
|
return g(e) === 61 ? (g(e), 4194334) : 8390980;
|
|
1800
|
-
if (
|
|
1800
|
+
if (r === 61)
|
|
1801
1801
|
return g(e), 4194333;
|
|
1802
1802
|
}
|
|
1803
1803
|
return 8390979;
|
|
@@ -1812,8 +1812,8 @@ function Ti(e, t, i) {
|
|
|
1812
1812
|
if (a === 63)
|
|
1813
1813
|
return g(e), e.currentChar === 61 ? (g(e), 4194346) : 276824445;
|
|
1814
1814
|
if (a === 46) {
|
|
1815
|
-
const
|
|
1816
|
-
if (
|
|
1815
|
+
const r = e.index + 1;
|
|
1816
|
+
if (r < e.end && (a = u.charCodeAt(r), !(a >= 48 && a <= 57)))
|
|
1817
1817
|
return g(e), 67108990;
|
|
1818
1818
|
}
|
|
1819
1819
|
return 22;
|
|
@@ -4369,14 +4369,14 @@ function gu(e, t, i) {
|
|
|
4369
4369
|
m(e, t | 32 | 262144);
|
|
4370
4370
|
const n = [];
|
|
4371
4371
|
for (; e.getToken() === 134283267; ) {
|
|
4372
|
-
const { index: u, tokenValue: s, tokenStart: o, tokenIndex: a } = e,
|
|
4372
|
+
const { index: u, tokenValue: s, tokenStart: o, tokenIndex: a } = e, r = e.getToken(), f = J(e, t);
|
|
4373
4373
|
if (Si(e, u, a, s)) {
|
|
4374
4374
|
if (t |= 1, e.flags & 64)
|
|
4375
4375
|
throw new M(e.tokenStart, e.currentLocation, 9);
|
|
4376
4376
|
if (e.flags & 4096)
|
|
4377
4377
|
throw new M(e.tokenStart, e.currentLocation, 15);
|
|
4378
4378
|
}
|
|
4379
|
-
n.push(Ht(e, t, f,
|
|
4379
|
+
n.push(Ht(e, t, f, r, o));
|
|
4380
4380
|
}
|
|
4381
4381
|
for (; e.getToken() !== 1048576; )
|
|
4382
4382
|
n.push(We(e, t, i, void 0, 4, {}));
|
|
@@ -4487,7 +4487,7 @@ function Xe(e, t, i, n, u, s, o) {
|
|
|
4487
4487
|
}
|
|
4488
4488
|
}
|
|
4489
4489
|
function ku(e, t, i, n, u, s, o) {
|
|
4490
|
-
const { tokenValue: a, tokenStart:
|
|
4490
|
+
const { tokenValue: a, tokenStart: r } = e, f = e.getToken();
|
|
4491
4491
|
let c;
|
|
4492
4492
|
switch (f) {
|
|
4493
4493
|
case 241737:
|
|
@@ -4496,7 +4496,7 @@ function ku(e, t, i, n, u, s, o) {
|
|
|
4496
4496
|
default:
|
|
4497
4497
|
c = Z(e, t, n, 2, 0, 1, 0, 1, e.tokenStart);
|
|
4498
4498
|
}
|
|
4499
|
-
return f & 143360 && e.getToken() === 21 ? Jt(e, t, i, n, u, s, a, c, f, o,
|
|
4499
|
+
return f & 143360 && e.getToken() === 21 ? Jt(e, t, i, n, u, s, a, c, f, o, r) : (c = P(e, t, n, c, 0, 0, r), c = O(e, t, n, 0, 0, r, c), e.getToken() === 18 && (c = de(e, t, n, 0, r, c)), Be(e, t, c, r));
|
|
4500
4500
|
}
|
|
4501
4501
|
function Ue(e, t, i, n, u, s = e.tokenStart, o = "BlockStatement") {
|
|
4502
4502
|
const a = [];
|
|
@@ -4523,8 +4523,8 @@ function Be(e, t, i, n) {
|
|
|
4523
4523
|
expression: i
|
|
4524
4524
|
}, n);
|
|
4525
4525
|
}
|
|
4526
|
-
function Jt(e, t, i, n, u, s, o, a,
|
|
4527
|
-
ut(e, t, 0,
|
|
4526
|
+
function Jt(e, t, i, n, u, s, o, a, r, f, c) {
|
|
4527
|
+
ut(e, t, 0, r, 1), eu(e, s, o), m(e, t | 32);
|
|
4528
4528
|
const h = f && (t & 1) === 0 && e.options.webcompat && e.getToken() === 86104 ? Ce(e, t, i?.createChildScope(), n, u, 0, 0, 0, e.tokenStart) : Xe(e, t, i, n, u, s, f);
|
|
4529
4529
|
return e.finishNode({
|
|
4530
4530
|
type: "LabeledStatement",
|
|
@@ -4533,18 +4533,18 @@ function Jt(e, t, i, n, u, s, o, a, l, f, c) {
|
|
|
4533
4533
|
}, c);
|
|
4534
4534
|
}
|
|
4535
4535
|
function Fi(e, t, i, n, u, s, o) {
|
|
4536
|
-
const { tokenValue: a, tokenStart:
|
|
4536
|
+
const { tokenValue: a, tokenStart: r } = e, f = e.getToken();
|
|
4537
4537
|
let c = V(e, t);
|
|
4538
4538
|
if (e.getToken() === 21)
|
|
4539
|
-
return Jt(e, t, i, n, u, s, a, c, f, 1,
|
|
4539
|
+
return Jt(e, t, i, n, u, s, a, c, f, 1, r);
|
|
4540
4540
|
const h = e.flags & 1;
|
|
4541
4541
|
if (!h) {
|
|
4542
4542
|
if (e.getToken() === 86104)
|
|
4543
|
-
return o || e.report(123), Ce(e, t, i, n, u, 1, 0, 1,
|
|
4543
|
+
return o || e.report(123), Ce(e, t, i, n, u, 1, 0, 1, r);
|
|
4544
4544
|
if (He(t, e.getToken()))
|
|
4545
|
-
return c = Hi(e, t, n, 1,
|
|
4545
|
+
return c = Hi(e, t, n, 1, r), e.getToken() === 18 && (c = de(e, t, n, 0, r, c)), Be(e, t, c, r);
|
|
4546
4546
|
}
|
|
4547
|
-
return e.getToken() === 67174411 ? c = Qt(e, t, n, c, 1, 1, 0, h,
|
|
4547
|
+
return e.getToken() === 67174411 ? c = Qt(e, t, n, c, 1, 1, 0, h, r) : (e.getToken() === 10 && (dt(e, t, f), (f & 36864) === 36864 && (e.flags |= 256), c = bt(e, t | 2048, n, e.tokenValue, c, 0, 1, 0, r)), e.assignable = 1), c = P(e, t, n, c, 0, 0, r), c = O(e, t, n, 0, 0, r, c), e.assignable = 1, e.getToken() === 18 && (c = de(e, t, n, 0, r, c)), Be(e, t, c, r);
|
|
4548
4548
|
}
|
|
4549
4549
|
function Ht(e, t, i, n, u) {
|
|
4550
4550
|
const s = e.startIndex;
|
|
@@ -4576,12 +4576,12 @@ function Au(e, t, i, n, u) {
|
|
|
4576
4576
|
const o = z(e, t, n, 0, 1, e.tokenStart);
|
|
4577
4577
|
p(e, t | 32, 16);
|
|
4578
4578
|
const a = li(e, t, i, n, u);
|
|
4579
|
-
let
|
|
4580
|
-
return e.getToken() === 20563 && (m(e, t | 32),
|
|
4579
|
+
let r = null;
|
|
4580
|
+
return e.getToken() === 20563 && (m(e, t | 32), r = li(e, t, i, n, u)), e.finishNode({
|
|
4581
4581
|
type: "IfStatement",
|
|
4582
4582
|
test: o,
|
|
4583
4583
|
consequent: a,
|
|
4584
|
-
alternate:
|
|
4584
|
+
alternate: r
|
|
4585
4585
|
}, s);
|
|
4586
4586
|
}
|
|
4587
4587
|
function li(e, t, i, n, u) {
|
|
@@ -4594,12 +4594,12 @@ function vu(e, t, i, n, u) {
|
|
|
4594
4594
|
const o = z(e, t, n, 0, 1, e.tokenStart);
|
|
4595
4595
|
p(e, t, 16), p(e, t, 2162700);
|
|
4596
4596
|
const a = [];
|
|
4597
|
-
let
|
|
4597
|
+
let r = 0;
|
|
4598
4598
|
for (i = i?.createChildScope(8); e.getToken() !== 1074790415; ) {
|
|
4599
4599
|
const { tokenStart: f } = e;
|
|
4600
4600
|
let c = null;
|
|
4601
4601
|
const h = [];
|
|
4602
|
-
for (T(e, t | 32, 20556) ? c = z(e, t, n, 0, 1, e.tokenStart) : (p(e, t | 32, 20561),
|
|
4602
|
+
for (T(e, t | 32, 20556) ? c = z(e, t, n, 0, 1, e.tokenStart) : (p(e, t | 32, 20561), r && e.report(89), r = 1), p(e, t | 32, 21); e.getToken() !== 20556 && e.getToken() !== 1074790415 && e.getToken() !== 20561; )
|
|
4603
4603
|
h.push(We(e, t | 4, i, n, 2, {
|
|
4604
4604
|
$: u
|
|
4605
4605
|
}));
|
|
@@ -4678,7 +4678,7 @@ function Tu(e, t) {
|
|
|
4678
4678
|
function Su(e, t, i, n, u) {
|
|
4679
4679
|
const s = e.tokenStart;
|
|
4680
4680
|
m(e, t | 32);
|
|
4681
|
-
const o = i?.createChildScope(16), a = Ue(e, t, o, n, { $: u }), { tokenStart:
|
|
4681
|
+
const o = i?.createChildScope(16), a = Ue(e, t, o, n, { $: u }), { tokenStart: r } = e, f = T(e, t | 32, 20557) ? Iu(e, t, i, n, u, r) : null;
|
|
4682
4682
|
let c = null;
|
|
4683
4683
|
if (e.getToken() === 20566) {
|
|
4684
4684
|
m(e, t | 32);
|
|
@@ -4695,11 +4695,11 @@ function Su(e, t, i, n, u) {
|
|
|
4695
4695
|
function Iu(e, t, i, n, u, s) {
|
|
4696
4696
|
let o = null, a = i;
|
|
4697
4697
|
T(e, t, 67174411) && (i = i?.createChildScope(4), o = Xi(e, t, i, n, (e.getToken() & 2097152) === 2097152 ? 256 : 512, 0), e.getToken() === 18 ? e.report(86) : e.getToken() === 1077936155 && e.report(87), p(e, t | 32, 16)), a = i?.createChildScope(32);
|
|
4698
|
-
const
|
|
4698
|
+
const r = Ue(e, t, a, n, { $: u });
|
|
4699
4699
|
return e.finishNode({
|
|
4700
4700
|
type: "CatchClause",
|
|
4701
4701
|
param: o,
|
|
4702
|
-
body:
|
|
4702
|
+
body: r
|
|
4703
4703
|
}, s);
|
|
4704
4704
|
}
|
|
4705
4705
|
function Bu(e, t, i, n, u) {
|
|
@@ -4721,7 +4721,7 @@ function Nu(e, t, i, n, u) {
|
|
|
4721
4721
|
}
|
|
4722
4722
|
function _u(e, t, i, n, u) {
|
|
4723
4723
|
const { tokenValue: s, tokenStart: o } = e, a = e.getToken();
|
|
4724
|
-
let
|
|
4724
|
+
let r = V(e, t);
|
|
4725
4725
|
if (e.getToken() & 2240512) {
|
|
4726
4726
|
const f = Ie(e, t, i, n, 8, 0);
|
|
4727
4727
|
return X(e, t | 32), e.finishNode({
|
|
@@ -4731,13 +4731,13 @@ function _u(e, t, i, n, u) {
|
|
|
4731
4731
|
}, o);
|
|
4732
4732
|
}
|
|
4733
4733
|
if (e.assignable = 1, t & 1 && e.report(85), e.getToken() === 21)
|
|
4734
|
-
return Jt(e, t, i, n, u, {}, s,
|
|
4734
|
+
return Jt(e, t, i, n, u, {}, s, r, a, 0, o);
|
|
4735
4735
|
if (e.getToken() === 10) {
|
|
4736
4736
|
let f;
|
|
4737
|
-
e.options.lexical && (f = gt(e, t, s)), e.flags = (e.flags | 128) ^ 128,
|
|
4737
|
+
e.options.lexical && (f = gt(e, t, s)), e.flags = (e.flags | 128) ^ 128, r = $e(e, t, f, n, [r], 0, o);
|
|
4738
4738
|
} else
|
|
4739
|
-
|
|
4740
|
-
return e.getToken() === 18 && (
|
|
4739
|
+
r = P(e, t, n, r, 0, 0, o), r = O(e, t, n, 0, 0, o, r);
|
|
4740
|
+
return e.getToken() === 18 && (r = de(e, t, n, 0, o, r)), Be(e, t, r, o);
|
|
4741
4741
|
}
|
|
4742
4742
|
function Bt(e, t, i, n, u, s) {
|
|
4743
4743
|
const o = e.tokenStart;
|
|
@@ -4770,16 +4770,16 @@ function Ie(e, t, i, n, u, s) {
|
|
|
4770
4770
|
}
|
|
4771
4771
|
function ci(e, t, i, n, u, s) {
|
|
4772
4772
|
const { tokenStart: o } = e, a = e.getToken();
|
|
4773
|
-
let
|
|
4773
|
+
let r = null;
|
|
4774
4774
|
const f = Xi(e, t, i, n, u, s);
|
|
4775
4775
|
if (e.getToken() === 1077936155) {
|
|
4776
|
-
if (m(e, t | 32),
|
|
4776
|
+
if (m(e, t | 32), r = R(e, t, n, 1, 0, e.tokenStart), (s & 32 || (a & 2097152) === 0) && (e.getToken() === 471156 || e.getToken() === 8673330 && (a & 2097152 || (u & 4) === 0 || t & 1)))
|
|
4777
4777
|
throw new M(o, e.currentLocation, 60, e.getToken() === 471156 ? "of" : "in");
|
|
4778
4778
|
} else (u & 16 || (a & 2097152) > 0) && (e.getToken() & 262144) !== 262144 && e.report(59, u & 16 ? "const" : "destructuring");
|
|
4779
4779
|
return e.finishNode({
|
|
4780
4780
|
type: "VariableDeclarator",
|
|
4781
4781
|
id: f,
|
|
4782
|
-
init:
|
|
4782
|
+
init: r
|
|
4783
4783
|
}, o);
|
|
4784
4784
|
}
|
|
4785
4785
|
function Fu(e, t, i, n, u) {
|
|
@@ -4787,7 +4787,7 @@ function Fu(e, t, i, n, u) {
|
|
|
4787
4787
|
m(e, t);
|
|
4788
4788
|
const o = ((t & 2048) > 0 || (t & 2) > 0 && (t & 8) > 0) && T(e, t, 209006);
|
|
4789
4789
|
p(e, t | 32, 67174411), i = i?.createChildScope(1);
|
|
4790
|
-
let a = null,
|
|
4790
|
+
let a = null, r = null, f = 0, c = null, h = e.getToken() === 86088 || e.getToken() === 241737 || e.getToken() === 86090, d;
|
|
4791
4791
|
const { tokenStart: y } = e, C = e.getToken();
|
|
4792
4792
|
if (h)
|
|
4793
4793
|
C === 241737 ? (c = V(e, t), e.getToken() & 2240512 ? (e.getToken() === 8673330 ? t & 1 && e.report(67) : c = e.finishNode({
|
|
@@ -4831,13 +4831,13 @@ function Fu(e, t, i, n, u) {
|
|
|
4831
4831
|
right: d
|
|
4832
4832
|
}, s);
|
|
4833
4833
|
}
|
|
4834
|
-
o && e.report(82), h || (f & 8 && e.getToken() !== 1077936155 && e.report(80, "loop"), c = O(e, t | 131072, n, 0, 0, y, c)), e.getToken() === 18 && (c = de(e, t, n, 0, y, c)), p(e, t | 32, 1074790417), e.getToken() !== 1074790417 && (a = z(e, t, n, 0, 1, e.tokenStart)), p(e, t | 32, 1074790417), e.getToken() !== 16 && (
|
|
4834
|
+
o && e.report(82), h || (f & 8 && e.getToken() !== 1077936155 && e.report(80, "loop"), c = O(e, t | 131072, n, 0, 0, y, c)), e.getToken() === 18 && (c = de(e, t, n, 0, y, c)), p(e, t | 32, 1074790417), e.getToken() !== 1074790417 && (a = z(e, t, n, 0, 1, e.tokenStart)), p(e, t | 32, 1074790417), e.getToken() !== 16 && (r = z(e, t, n, 0, 1, e.tokenStart)), p(e, t | 32, 16);
|
|
4835
4835
|
const D = Oe(e, t, i, n, u);
|
|
4836
4836
|
return e.finishNode({
|
|
4837
4837
|
type: "ForStatement",
|
|
4838
4838
|
init: c,
|
|
4839
4839
|
test: a,
|
|
4840
|
-
update:
|
|
4840
|
+
update: r,
|
|
4841
4841
|
body: D
|
|
4842
4842
|
}, s);
|
|
4843
4843
|
}
|
|
@@ -4888,13 +4888,13 @@ function Lu(e, t, i) {
|
|
|
4888
4888
|
}
|
|
4889
4889
|
u = Pu(e, t);
|
|
4890
4890
|
}
|
|
4891
|
-
const a = Nt(e, t),
|
|
4891
|
+
const a = Nt(e, t), r = {
|
|
4892
4892
|
type: "ImportDeclaration",
|
|
4893
4893
|
specifiers: o,
|
|
4894
4894
|
source: u,
|
|
4895
4895
|
attributes: a
|
|
4896
4896
|
};
|
|
4897
|
-
return X(e, t | 32), e.finishNode(
|
|
4897
|
+
return X(e, t | 32), e.finishNode(r, n);
|
|
4898
4898
|
}
|
|
4899
4899
|
function fi(e, t, i) {
|
|
4900
4900
|
const { tokenStart: n } = e;
|
|
@@ -4912,10 +4912,10 @@ function hi(e, t, i, n) {
|
|
|
4912
4912
|
for (m(e, t); e.getToken() & 143360 || e.getToken() === 134283267; ) {
|
|
4913
4913
|
let { tokenValue: u, tokenStart: s } = e;
|
|
4914
4914
|
const o = e.getToken(), a = et(e, t);
|
|
4915
|
-
let
|
|
4916
|
-
T(e, t, 77932) ? ((e.getToken() & 134217728) === 134217728 || e.getToken() === 18 ? e.report(106) : ut(e, t, 16, e.getToken(), 0), u = e.tokenValue,
|
|
4915
|
+
let r;
|
|
4916
|
+
T(e, t, 77932) ? ((e.getToken() & 134217728) === 134217728 || e.getToken() === 18 ? e.report(106) : ut(e, t, 16, e.getToken(), 0), u = e.tokenValue, r = V(e, t)) : a.type === "Identifier" ? (ut(e, t, 16, o, 0), r = e.cloneIdentifier(a)) : e.report(25, N[108]), i?.addBlockName(t, u, 8, 0), n.push(e.finishNode({
|
|
4917
4917
|
type: "ImportSpecifier",
|
|
4918
|
-
local:
|
|
4918
|
+
local: r,
|
|
4919
4919
|
imported: a
|
|
4920
4920
|
}, s)), e.getToken() !== 1074790415 && p(e, t, 18);
|
|
4921
4921
|
}
|
|
@@ -5018,14 +5018,14 @@ function Vu(e, t, i) {
|
|
|
5018
5018
|
default:
|
|
5019
5019
|
e.report(30, N[e.getToken() & 255]);
|
|
5020
5020
|
}
|
|
5021
|
-
const
|
|
5021
|
+
const r = {
|
|
5022
5022
|
type: "ExportNamedDeclaration",
|
|
5023
5023
|
declaration: s,
|
|
5024
5024
|
specifiers: u,
|
|
5025
5025
|
source: o,
|
|
5026
5026
|
attributes: a
|
|
5027
5027
|
};
|
|
5028
|
-
return e.finishNode(
|
|
5028
|
+
return e.finishNode(r, n);
|
|
5029
5029
|
}
|
|
5030
5030
|
function R(e, t, i, n, u, s) {
|
|
5031
5031
|
let o = Z(e, t, i, 2, 0, n, u, 1, s);
|
|
@@ -5048,16 +5048,16 @@ function O(e, t, i, n, u, s, o) {
|
|
|
5048
5048
|
const a = e.getToken();
|
|
5049
5049
|
if ((a & 4194304) === 4194304) {
|
|
5050
5050
|
e.assignable & 2 && e.report(26), (!u && a === 1077936155 && o.type === "ArrayExpression" || o.type === "ObjectExpression") && re(e, o), m(e, t | 32);
|
|
5051
|
-
const
|
|
5051
|
+
const r = R(e, t, i, 1, n, e.tokenStart);
|
|
5052
5052
|
return e.assignable = 2, e.finishNode(u ? {
|
|
5053
5053
|
type: "AssignmentPattern",
|
|
5054
5054
|
left: o,
|
|
5055
|
-
right:
|
|
5055
|
+
right: r
|
|
5056
5056
|
} : {
|
|
5057
5057
|
type: "AssignmentExpression",
|
|
5058
5058
|
left: o,
|
|
5059
5059
|
operator: N[a & 255],
|
|
5060
|
-
right:
|
|
5060
|
+
right: r
|
|
5061
5061
|
}, s);
|
|
5062
5062
|
}
|
|
5063
5063
|
return (a & 8388608) === 8388608 && (o = ye(e, t, i, n, s, 4, a, o)), T(e, t | 32, 22) && (o = Ee(e, t, i, o, s)), o;
|
|
@@ -5065,16 +5065,16 @@ function O(e, t, i, n, u, s, o) {
|
|
|
5065
5065
|
function Ze(e, t, i, n, u, s, o) {
|
|
5066
5066
|
const a = e.getToken();
|
|
5067
5067
|
m(e, t | 32);
|
|
5068
|
-
const
|
|
5068
|
+
const r = R(e, t, i, 1, n, e.tokenStart);
|
|
5069
5069
|
return o = e.finishNode(u ? {
|
|
5070
5070
|
type: "AssignmentPattern",
|
|
5071
5071
|
left: o,
|
|
5072
|
-
right:
|
|
5072
|
+
right: r
|
|
5073
5073
|
} : {
|
|
5074
5074
|
type: "AssignmentExpression",
|
|
5075
5075
|
left: o,
|
|
5076
5076
|
operator: N[a & 255],
|
|
5077
|
-
right:
|
|
5077
|
+
right: r
|
|
5078
5078
|
}, s), e.assignable = 2, o;
|
|
5079
5079
|
}
|
|
5080
5080
|
function Ee(e, t, i, n, u) {
|
|
@@ -5089,9 +5089,9 @@ function Ee(e, t, i, n, u) {
|
|
|
5089
5089
|
}, u);
|
|
5090
5090
|
}
|
|
5091
5091
|
function ye(e, t, i, n, u, s, o, a) {
|
|
5092
|
-
const
|
|
5092
|
+
const r = -((t & 131072) > 0) & 8673330;
|
|
5093
5093
|
let f, c;
|
|
5094
|
-
for (e.assignable = 2; e.getToken() & 8388608 && (f = e.getToken(), c = f & 3840, (f & 524288 && o & 268435456 || o & 524288 && f & 268435456) && e.report(165), !(c + ((f === 8391735) << 8) - ((
|
|
5094
|
+
for (e.assignable = 2; e.getToken() & 8388608 && (f = e.getToken(), c = f & 3840, (f & 524288 && o & 268435456 || o & 524288 && f & 268435456) && e.report(165), !(c + ((f === 8391735) << 8) - ((r === f) << 12) <= s)); )
|
|
5095
5095
|
m(e, t | 32), a = e.finishNode({
|
|
5096
5096
|
type: f & 524288 || f & 268435456 ? "LogicalExpression" : "BinaryExpression",
|
|
5097
5097
|
left: a,
|
|
@@ -5113,14 +5113,14 @@ function Ru(e, t, i, n, u) {
|
|
|
5113
5113
|
}, s);
|
|
5114
5114
|
}
|
|
5115
5115
|
function Ou(e, t, i, n, u, s, o, a) {
|
|
5116
|
-
const
|
|
5116
|
+
const r = e.getToken(), f = V(e, t), { flags: c } = e;
|
|
5117
5117
|
if ((c & 1) === 0) {
|
|
5118
5118
|
if (e.getToken() === 86104)
|
|
5119
5119
|
return Ui(e, t, i, 1, n, a);
|
|
5120
5120
|
if (He(t, e.getToken()))
|
|
5121
5121
|
return u || e.report(0), (e.getToken() & 36864) === 36864 && (e.flags |= 256), Hi(e, t, i, s, a);
|
|
5122
5122
|
}
|
|
5123
|
-
return !o && e.getToken() === 67174411 ? Qt(e, t, i, f, s, 1, 0, c, a) : e.getToken() === 10 ? (dt(e, t,
|
|
5123
|
+
return !o && e.getToken() === 67174411 ? Qt(e, t, i, f, s, 1, 0, c, a) : e.getToken() === 10 ? (dt(e, t, r), o && e.report(51), (r & 36864) === 36864 && (e.flags |= 256), bt(e, t, i, e.tokenValue, f, o, s, 0, a)) : (e.assignable = 1, f);
|
|
5124
5124
|
}
|
|
5125
5125
|
function qu(e, t, i, n, u, s) {
|
|
5126
5126
|
if (n && (e.destructible |= 256), t & 1024) {
|
|
@@ -5151,10 +5151,10 @@ function Mu(e, t, i, n, u, s) {
|
|
|
5151
5151
|
if (t & 2048 || t & 2 && t & 8) {
|
|
5152
5152
|
if (n)
|
|
5153
5153
|
throw new M(s, { index: e.startIndex, line: e.startLine, column: e.startColumn }, 0);
|
|
5154
|
-
const
|
|
5154
|
+
const r = ie(e, t, i, 0, 0, 1);
|
|
5155
5155
|
return e.getToken() === 8391735 && e.report(33), e.assignable = 2, e.finishNode({
|
|
5156
5156
|
type: "AwaitExpression",
|
|
5157
|
-
argument:
|
|
5157
|
+
argument: r
|
|
5158
5158
|
}, s);
|
|
5159
5159
|
}
|
|
5160
5160
|
if (t & 2)
|
|
@@ -5164,7 +5164,7 @@ function Mu(e, t, i, n, u, s) {
|
|
|
5164
5164
|
function mt(e, t, i, n, u, s, o) {
|
|
5165
5165
|
const { tokenStart: a } = e;
|
|
5166
5166
|
p(e, t | 32, 2162700);
|
|
5167
|
-
const
|
|
5167
|
+
const r = [];
|
|
5168
5168
|
if (e.getToken() !== 1074790415) {
|
|
5169
5169
|
for (; e.getToken() === 134283267; ) {
|
|
5170
5170
|
const { index: f, tokenStart: c, tokenIndex: h, tokenValue: d } = e, y = e.getToken(), C = J(e, t);
|
|
@@ -5177,15 +5177,15 @@ function mt(e, t, i, n, u, s, o) {
|
|
|
5177
5177
|
throw new M(c, e.currentLocation, 15);
|
|
5178
5178
|
o?.reportScopeError();
|
|
5179
5179
|
}
|
|
5180
|
-
|
|
5180
|
+
r.push(Ht(e, t, C, y, c));
|
|
5181
5181
|
}
|
|
5182
5182
|
t & 1 && (s && ((s & 537079808) === 537079808 && e.report(119), (s & 36864) === 36864 && e.report(40)), e.flags & 512 && e.report(119), e.flags & 256 && e.report(118));
|
|
5183
5183
|
}
|
|
5184
5184
|
for (e.flags = (e.flags | 512 | 256 | 64 | 4096) ^ 4928, e.destructible = (e.destructible | 256) ^ 256; e.getToken() !== 1074790415; )
|
|
5185
|
-
|
|
5185
|
+
r.push(We(e, t, i, n, 4, {}));
|
|
5186
5186
|
return p(e, u & 24 ? t | 32 : t, 1074790415), e.flags &= -4289, e.getToken() === 1077936155 && e.report(26), e.finishNode({
|
|
5187
5187
|
type: "BlockStatement",
|
|
5188
|
-
body:
|
|
5188
|
+
body: r
|
|
5189
5189
|
}, a);
|
|
5190
5190
|
}
|
|
5191
5191
|
function Uu(e, t) {
|
|
@@ -5241,7 +5241,7 @@ function P(e, t, i, n, u, s, o) {
|
|
|
5241
5241
|
case 69271571: {
|
|
5242
5242
|
let a = !1;
|
|
5243
5243
|
(e.flags & 2048) === 2048 && (a = !0, e.flags = (e.flags | 2048) ^ 2048), m(e, t | 32);
|
|
5244
|
-
const { tokenStart:
|
|
5244
|
+
const { tokenStart: r } = e, f = z(e, t, i, u, 1, r);
|
|
5245
5245
|
p(e, t, 20), e.assignable = 1, n = e.finishNode({
|
|
5246
5246
|
type: "MemberExpression",
|
|
5247
5247
|
object: n,
|
|
@@ -5256,11 +5256,11 @@ function P(e, t, i, n, u, s, o) {
|
|
|
5256
5256
|
return e.flags = (e.flags | 1024) ^ 1024, n;
|
|
5257
5257
|
let a = !1;
|
|
5258
5258
|
(e.flags & 2048) === 2048 && (a = !0, e.flags = (e.flags | 2048) ^ 2048);
|
|
5259
|
-
const
|
|
5259
|
+
const r = $t(e, t, i, u);
|
|
5260
5260
|
e.assignable = 2, n = e.finishNode({
|
|
5261
5261
|
type: "CallExpression",
|
|
5262
5262
|
callee: n,
|
|
5263
|
-
arguments:
|
|
5263
|
+
arguments: r,
|
|
5264
5264
|
optional: !1
|
|
5265
5265
|
}, o), a && (e.flags |= 2048);
|
|
5266
5266
|
break;
|
|
@@ -5287,13 +5287,13 @@ function Ju(e, t, i, n, u) {
|
|
|
5287
5287
|
let s = !1, o;
|
|
5288
5288
|
if ((e.getToken() === 69271571 || e.getToken() === 67174411) && (e.flags & 2048) === 2048 && (s = !0, e.flags = (e.flags | 2048) ^ 2048), e.getToken() === 69271571) {
|
|
5289
5289
|
m(e, t | 32);
|
|
5290
|
-
const { tokenStart: a } = e,
|
|
5290
|
+
const { tokenStart: a } = e, r = z(e, t, i, 0, 1, a);
|
|
5291
5291
|
p(e, t, 20), e.assignable = 2, o = e.finishNode({
|
|
5292
5292
|
type: "MemberExpression",
|
|
5293
5293
|
object: n,
|
|
5294
5294
|
computed: !0,
|
|
5295
5295
|
optional: !0,
|
|
5296
|
-
property:
|
|
5296
|
+
property: r
|
|
5297
5297
|
}, u);
|
|
5298
5298
|
} else if (e.getToken() === 67174411) {
|
|
5299
5299
|
const a = $t(e, t, i, 0);
|
|
@@ -5330,25 +5330,25 @@ function Hu(e, t, i, n, u, s) {
|
|
|
5330
5330
|
prefix: !0
|
|
5331
5331
|
}, s);
|
|
5332
5332
|
}
|
|
5333
|
-
function Z(e, t, i, n, u, s, o, a,
|
|
5333
|
+
function Z(e, t, i, n, u, s, o, a, r) {
|
|
5334
5334
|
if ((e.getToken() & 143360) === 143360) {
|
|
5335
5335
|
switch (e.getToken()) {
|
|
5336
5336
|
case 209006:
|
|
5337
|
-
return Mu(e, t, i, u, o,
|
|
5337
|
+
return Mu(e, t, i, u, o, r);
|
|
5338
5338
|
case 241771:
|
|
5339
|
-
return qu(e, t, i, o, s,
|
|
5339
|
+
return qu(e, t, i, o, s, r);
|
|
5340
5340
|
case 209005:
|
|
5341
|
-
return Ou(e, t, i, o, a, s, u,
|
|
5341
|
+
return Ou(e, t, i, o, a, s, u, r);
|
|
5342
5342
|
}
|
|
5343
5343
|
const { tokenValue: f } = e, c = e.getToken(), h = V(e, t | 64);
|
|
5344
|
-
return e.getToken() === 10 ? (a || e.report(0), dt(e, t, c), (c & 36864) === 36864 && (e.flags |= 256), bt(e, t, i, f, h, u, s, 0,
|
|
5344
|
+
return e.getToken() === 10 ? (a || e.report(0), dt(e, t, c), (c & 36864) === 36864 && (e.flags |= 256), bt(e, t, i, f, h, u, s, 0, r)) : (t & 16 && !(t & 32768) && !(t & 8192) && e.tokenValue === "arguments" && e.report(130), (c & 255) === 73 && (t & 1 && e.report(113), n & 24 && e.report(100)), e.assignable = t & 1 && (c & 537079808) === 537079808 ? 2 : 1, h);
|
|
5345
5345
|
}
|
|
5346
5346
|
if ((e.getToken() & 134217728) === 134217728)
|
|
5347
5347
|
return J(e, t);
|
|
5348
5348
|
switch (e.getToken()) {
|
|
5349
5349
|
case 33619993:
|
|
5350
5350
|
case 33619994:
|
|
5351
|
-
return Hu(e, t, i, u, a,
|
|
5351
|
+
return Hu(e, t, i, u, a, r);
|
|
5352
5352
|
case 16863276:
|
|
5353
5353
|
case 16842798:
|
|
5354
5354
|
case 16842799:
|
|
@@ -5358,13 +5358,13 @@ function Z(e, t, i, n, u, s, o, a, l) {
|
|
|
5358
5358
|
case 16863277:
|
|
5359
5359
|
return Ru(e, t, i, a, o);
|
|
5360
5360
|
case 86104:
|
|
5361
|
-
return Ui(e, t, i, 0, o,
|
|
5361
|
+
return Ui(e, t, i, 0, o, r);
|
|
5362
5362
|
case 2162700:
|
|
5363
5363
|
return Zu(e, t, i, s ? 0 : 1, o);
|
|
5364
5364
|
case 69271571:
|
|
5365
5365
|
return Yu(e, t, i, s ? 0 : 1, o);
|
|
5366
5366
|
case 67174411:
|
|
5367
|
-
return es(e, t | 64, i, s, 1, 0,
|
|
5367
|
+
return es(e, t | 64, i, s, 1, 0, r);
|
|
5368
5368
|
case 86021:
|
|
5369
5369
|
case 86022:
|
|
5370
5370
|
case 86023:
|
|
@@ -5375,7 +5375,7 @@ function Z(e, t, i, n, u, s, o, a, l) {
|
|
|
5375
5375
|
return ns(e, t);
|
|
5376
5376
|
case 132:
|
|
5377
5377
|
case 86094:
|
|
5378
|
-
return us(e, t, i, o,
|
|
5378
|
+
return us(e, t, i, o, r);
|
|
5379
5379
|
case 86109:
|
|
5380
5380
|
return Uu(e, t);
|
|
5381
5381
|
case 67174409:
|
|
@@ -5389,7 +5389,7 @@ function Z(e, t, i, n, u, s, o, a, l) {
|
|
|
5389
5389
|
case 130:
|
|
5390
5390
|
return at(e, t, i, 0);
|
|
5391
5391
|
case 86106:
|
|
5392
|
-
return zu(e, t, i, u, o,
|
|
5392
|
+
return zu(e, t, i, u, o, r);
|
|
5393
5393
|
case 8456256:
|
|
5394
5394
|
if (e.options.jsx)
|
|
5395
5395
|
return pt(e, t, i, 0, e.tokenStart);
|
|
@@ -5418,8 +5418,8 @@ function qi(e, t, i, n, u) {
|
|
|
5418
5418
|
let o = null;
|
|
5419
5419
|
if (e.getToken() === 18) {
|
|
5420
5420
|
if (p(e, t, 18), e.getToken() !== 16) {
|
|
5421
|
-
const
|
|
5422
|
-
o = R(e,
|
|
5421
|
+
const r = (t | 131072) ^ 131072;
|
|
5422
|
+
o = R(e, r, i, 1, n, e.tokenStart);
|
|
5423
5423
|
}
|
|
5424
5424
|
T(e, t, 18);
|
|
5425
5425
|
}
|
|
@@ -5495,12 +5495,12 @@ function Xt(e, t, i) {
|
|
|
5495
5495
|
z(e, t & -65, i, 0, 1, e.tokenStart)
|
|
5496
5496
|
];
|
|
5497
5497
|
for (e.getToken() !== 1074790415 && e.report(83); e.setToken(Yn(e, t), !0) !== 67174409; ) {
|
|
5498
|
-
const { tokenValue:
|
|
5499
|
-
p(e, t & -65 | 32, 67174408), o.push(tt(e,
|
|
5498
|
+
const { tokenValue: r, tokenRaw: f, tokenStart: c } = e;
|
|
5499
|
+
p(e, t & -65 | 32, 67174408), o.push(tt(e, r, f, c, !1)), a.push(z(e, t, i, 0, 1, e.tokenStart)), e.getToken() !== 1074790415 && e.report(83);
|
|
5500
5500
|
}
|
|
5501
5501
|
{
|
|
5502
|
-
const { tokenValue:
|
|
5503
|
-
p(e, t, 67174409), o.push(tt(e,
|
|
5502
|
+
const { tokenValue: r, tokenRaw: f, tokenStart: c } = e;
|
|
5503
|
+
p(e, t, 67174409), o.push(tt(e, r, f, c, !0));
|
|
5504
5504
|
}
|
|
5505
5505
|
return e.finishNode({
|
|
5506
5506
|
type: "TemplateLiteral",
|
|
@@ -5567,7 +5567,7 @@ function Qu(e, t) {
|
|
|
5567
5567
|
type: "ThisExpression"
|
|
5568
5568
|
}, i);
|
|
5569
5569
|
}
|
|
5570
|
-
function Ce(e, t, i, n, u, s, o, a,
|
|
5570
|
+
function Ce(e, t, i, n, u, s, o, a, r) {
|
|
5571
5571
|
m(e, t | 32);
|
|
5572
5572
|
const f = s ? jt(e, t, 8391476) : 0;
|
|
5573
5573
|
let c = null, h, d = i ? e.createScope() : void 0;
|
|
@@ -5586,18 +5586,18 @@ function Ce(e, t, i, n, u, s, o, a, l) {
|
|
|
5586
5586
|
body: D,
|
|
5587
5587
|
async: a === 1,
|
|
5588
5588
|
generator: f === 1
|
|
5589
|
-
},
|
|
5589
|
+
}, r);
|
|
5590
5590
|
}
|
|
5591
5591
|
function Ui(e, t, i, n, u, s) {
|
|
5592
5592
|
m(e, t | 32);
|
|
5593
5593
|
const o = jt(e, t, 8391476), a = (n ? 2048 : 0) | (o ? 1024 : 0);
|
|
5594
|
-
let
|
|
5594
|
+
let r = null, f, c = e.createScopeIfLexical();
|
|
5595
5595
|
const h = 552704;
|
|
5596
|
-
e.getToken() & 143360 && (Ii(e, (t | h) ^ h | a, e.getToken()), c = c?.createChildScope(128), f = e.getToken(),
|
|
5596
|
+
e.getToken() & 143360 && (Ii(e, (t | h) ^ h | a, e.getToken()), c = c?.createChildScope(128), f = e.getToken(), r = V(e, t)), t = (t | h) ^ h | 65536 | a | (o ? 0 : 262144), c = c?.createChildScope(256);
|
|
5597
5597
|
const d = Ji(e, (t | 8192) & -524289, c, i, u, 1), y = mt(e, t & -131229 | 32768 | 4096, c?.createChildScope(64), i, 0, f, c);
|
|
5598
5598
|
return e.assignable = 2, e.finishNode({
|
|
5599
5599
|
type: "FunctionExpression",
|
|
5600
|
-
id:
|
|
5600
|
+
id: r,
|
|
5601
5601
|
params: d,
|
|
5602
5602
|
body: y,
|
|
5603
5603
|
async: n === 1,
|
|
@@ -5608,7 +5608,7 @@ function Yu(e, t, i, n, u) {
|
|
|
5608
5608
|
const s = ne(e, t, void 0, i, n, u, 0, 2, 0);
|
|
5609
5609
|
return e.destructible & 64 && e.report(63), e.destructible & 8 && e.report(62), s;
|
|
5610
5610
|
}
|
|
5611
|
-
function ne(e, t, i, n, u, s, o, a,
|
|
5611
|
+
function ne(e, t, i, n, u, s, o, a, r) {
|
|
5612
5612
|
const { tokenStart: f } = e;
|
|
5613
5613
|
m(e, t | 32);
|
|
5614
5614
|
const c = [];
|
|
@@ -5621,7 +5621,7 @@ function ne(e, t, i, n, u, s, o, a, l) {
|
|
|
5621
5621
|
const { tokenStart: C, tokenValue: D } = e, w = e.getToken();
|
|
5622
5622
|
if (w & 143360)
|
|
5623
5623
|
if (y = Z(e, t, n, a, 0, 1, s, 1, C), e.getToken() === 1077936155) {
|
|
5624
|
-
e.assignable & 2 && e.report(26), m(e, t | 32), i?.addVarOrBlock(t, D, a,
|
|
5624
|
+
e.assignable & 2 && e.report(26), m(e, t | 32), i?.addVarOrBlock(t, D, a, r);
|
|
5625
5625
|
const E = R(e, t, n, 1, s, e.tokenStart);
|
|
5626
5626
|
y = e.finishNode(o ? {
|
|
5627
5627
|
type: "AssignmentPattern",
|
|
@@ -5633,8 +5633,8 @@ function ne(e, t, i, n, u, s, o, a, l) {
|
|
|
5633
5633
|
left: y,
|
|
5634
5634
|
right: E
|
|
5635
5635
|
}, C), h |= e.destructible & 256 ? 256 : 0 | e.destructible & 128 ? 128 : 0;
|
|
5636
|
-
} else e.getToken() === 18 || e.getToken() === 20 ? (e.assignable & 2 ? h |= 16 : i?.addVarOrBlock(t, D, a,
|
|
5637
|
-
else w & 2097152 ? (y = e.getToken() === 2162700 ? ue(e, t, i, n, 0, s, o, a,
|
|
5636
|
+
} else e.getToken() === 18 || e.getToken() === 20 ? (e.assignable & 2 ? h |= 16 : i?.addVarOrBlock(t, D, a, r), h |= e.destructible & 256 ? 256 : 0 | e.destructible & 128 ? 128 : 0) : (h |= a & 1 ? 32 : (a & 2) === 0 ? 16 : 0, y = P(e, t, n, y, s, 0, C), e.getToken() !== 18 && e.getToken() !== 20 ? (e.getToken() !== 1077936155 && (h |= 16), y = O(e, t, n, s, o, C, y)) : e.getToken() !== 1077936155 && (h |= e.assignable & 2 ? 16 : 32));
|
|
5637
|
+
else w & 2097152 ? (y = e.getToken() === 2162700 ? ue(e, t, i, n, 0, s, o, a, r) : ne(e, t, i, n, 0, s, o, a, r), h |= e.destructible, e.assignable = e.destructible & 16 ? 2 : 1, e.getToken() === 18 || e.getToken() === 20 ? e.assignable & 2 && (h |= 16) : e.destructible & 8 ? e.report(71) : (y = P(e, t, n, y, s, 0, C), h = e.assignable & 2 ? 16 : 0, e.getToken() !== 18 && e.getToken() !== 20 ? y = O(e, t, n, s, o, C, y) : e.getToken() !== 1077936155 && (h |= e.assignable & 2 ? 16 : 32))) : w === 14 ? (y = Ne(e, t, i, n, 20, a, r, 0, s, o), h |= e.destructible, e.getToken() !== 18 && e.getToken() !== 20 && e.report(30, N[e.getToken() & 255])) : (y = ie(e, t, n, 1, 0, 1), e.getToken() !== 18 && e.getToken() !== 20 ? (y = O(e, t, n, s, o, C, y), (a & 3) === 0 && w === 67174411 && (h |= 16)) : e.assignable & 2 ? h |= 16 : w === 67174411 && (h |= e.assignable & 1 && a & 3 ? 32 : 16));
|
|
5638
5638
|
if (c.push(y), T(e, t | 32, 18)) {
|
|
5639
5639
|
if (e.getToken() === 20)
|
|
5640
5640
|
break;
|
|
@@ -5650,7 +5650,7 @@ function ne(e, t, i, n, u, s, o, a, l) {
|
|
|
5650
5650
|
}
|
|
5651
5651
|
function ji(e, t, i, n, u, s, o, a) {
|
|
5652
5652
|
e.getToken() !== 1077936155 && e.report(26), m(e, t | 32), n & 16 && e.report(26), s || re(e, a);
|
|
5653
|
-
const { tokenStart:
|
|
5653
|
+
const { tokenStart: r } = e, f = R(e, t, i, 1, u, r);
|
|
5654
5654
|
return e.destructible = (n | 64 | 8) ^ 72 | (e.destructible & 128 ? 128 : 0) | (e.destructible & 256 ? 256 : 0), e.finishNode(s ? {
|
|
5655
5655
|
type: "AssignmentPattern",
|
|
5656
5656
|
left: a,
|
|
@@ -5662,22 +5662,22 @@ function ji(e, t, i, n, u, s, o, a) {
|
|
|
5662
5662
|
right: f
|
|
5663
5663
|
}, o);
|
|
5664
5664
|
}
|
|
5665
|
-
function Ne(e, t, i, n, u, s, o, a,
|
|
5665
|
+
function Ne(e, t, i, n, u, s, o, a, r, f) {
|
|
5666
5666
|
const { tokenStart: c } = e;
|
|
5667
5667
|
m(e, t | 32);
|
|
5668
5668
|
let h = null, d = 0;
|
|
5669
5669
|
const { tokenValue: y, tokenStart: C } = e;
|
|
5670
5670
|
let D = e.getToken();
|
|
5671
5671
|
if (D & 143360)
|
|
5672
|
-
e.assignable = 1, h = Z(e, t, n, s, 0, 1,
|
|
5672
|
+
e.assignable = 1, h = Z(e, t, n, s, 0, 1, r, 1, C), D = e.getToken(), h = P(e, t, n, h, r, 0, C), e.getToken() !== 18 && e.getToken() !== u && (e.assignable & 2 && e.getToken() === 1077936155 && e.report(71), d |= 16, h = O(e, t, n, r, f, C, h)), e.assignable & 2 ? d |= 16 : D === u || D === 18 ? i?.addVarOrBlock(t, y, s, o) : d |= 32, d |= e.destructible & 128 ? 128 : 0;
|
|
5673
5673
|
else if (D === u)
|
|
5674
5674
|
e.report(41);
|
|
5675
5675
|
else if (D & 2097152)
|
|
5676
|
-
h = e.getToken() === 2162700 ? ue(e, t, i, n, 1,
|
|
5676
|
+
h = e.getToken() === 2162700 ? ue(e, t, i, n, 1, r, f, s, o) : ne(e, t, i, n, 1, r, f, s, o), D = e.getToken(), D !== 1077936155 && D !== u && D !== 18 ? (e.destructible & 8 && e.report(71), h = P(e, t, n, h, r, 0, C), d |= e.assignable & 2 ? 16 : 0, (e.getToken() & 4194304) === 4194304 ? (e.getToken() !== 1077936155 && (d |= 16), h = O(e, t, n, r, f, C, h)) : ((e.getToken() & 8388608) === 8388608 && (h = ye(e, t, n, 1, C, 4, D, h)), T(e, t | 32, 22) && (h = Ee(e, t, n, h, C)), d |= e.assignable & 2 ? 16 : 32)) : d |= u === 1074790415 && D !== 1077936155 ? 16 : e.destructible;
|
|
5677
5677
|
else {
|
|
5678
|
-
d |= 32, h = ie(e, t, n, 1,
|
|
5678
|
+
d |= 32, h = ie(e, t, n, 1, r, 1);
|
|
5679
5679
|
const { tokenStart: w } = e, E = e.getToken();
|
|
5680
|
-
return E === 1077936155 ? (e.assignable & 2 && e.report(26), h = O(e, t, n,
|
|
5680
|
+
return E === 1077936155 ? (e.assignable & 2 && e.report(26), h = O(e, t, n, r, f, w, h), d |= 16) : (E === 18 ? d |= 16 : E !== u && (h = O(e, t, n, r, f, w, h)), d |= e.assignable & 1 ? 32 : 16), e.destructible = d, e.getToken() !== u && e.getToken() !== 18 && e.report(161), e.finishNode({
|
|
5681
5681
|
type: f ? "RestElement" : "SpreadElement",
|
|
5682
5682
|
argument: h
|
|
5683
5683
|
}, c);
|
|
@@ -5685,7 +5685,7 @@ function Ne(e, t, i, n, u, s, o, a, l, f) {
|
|
|
5685
5685
|
if (e.getToken() !== u)
|
|
5686
5686
|
if (s & 1 && (d |= a ? 16 : 32), T(e, t | 32, 1077936155)) {
|
|
5687
5687
|
d & 16 && e.report(26), re(e, h);
|
|
5688
|
-
const w = R(e, t, n, 1,
|
|
5688
|
+
const w = R(e, t, n, 1, r, e.tokenStart);
|
|
5689
5689
|
h = e.finishNode(f ? {
|
|
5690
5690
|
type: "AssignmentPattern",
|
|
5691
5691
|
left: h,
|
|
@@ -5707,12 +5707,12 @@ function oe(e, t, i, n, u, s) {
|
|
|
5707
5707
|
const o = 11264 | ((n & 64) === 0 ? 16896 : 0);
|
|
5708
5708
|
t = (t | o) ^ o | (n & 8 ? 1024 : 0) | (n & 16 ? 2048 : 0) | (n & 64 ? 16384 : 0) | 256 | 32768 | 65536;
|
|
5709
5709
|
let a = e.createScopeIfLexical(256);
|
|
5710
|
-
const
|
|
5710
|
+
const r = Gu(e, (t | 8192) & -524289, a, i, n, 1, u);
|
|
5711
5711
|
a = a?.createChildScope(64);
|
|
5712
5712
|
const f = mt(e, t & -655373 | 32768 | 4096, a, i, 0, void 0, a?.parent);
|
|
5713
5713
|
return e.finishNode({
|
|
5714
5714
|
type: "FunctionExpression",
|
|
5715
|
-
params:
|
|
5715
|
+
params: r,
|
|
5716
5716
|
body: f,
|
|
5717
5717
|
async: (n & 16) > 0,
|
|
5718
5718
|
generator: (n & 8) > 0,
|
|
@@ -5723,7 +5723,7 @@ function Zu(e, t, i, n, u) {
|
|
|
5723
5723
|
const s = ue(e, t, void 0, i, n, u, 0, 2, 0);
|
|
5724
5724
|
return e.destructible & 64 && e.report(63), e.destructible & 8 && e.report(62), s;
|
|
5725
5725
|
}
|
|
5726
|
-
function ue(e, t, i, n, u, s, o, a,
|
|
5726
|
+
function ue(e, t, i, n, u, s, o, a, r) {
|
|
5727
5727
|
const { tokenStart: f } = e;
|
|
5728
5728
|
m(e, t);
|
|
5729
5729
|
const c = [];
|
|
@@ -5731,12 +5731,12 @@ function ue(e, t, i, n, u, s, o, a, l) {
|
|
|
5731
5731
|
for (t = (t | 131072) ^ 131072; e.getToken() !== 1074790415; ) {
|
|
5732
5732
|
const { tokenValue: C, tokenStart: D } = e, w = e.getToken();
|
|
5733
5733
|
if (w === 14)
|
|
5734
|
-
c.push(Ne(e, t, i, n, 1074790415, a,
|
|
5734
|
+
c.push(Ne(e, t, i, n, 1074790415, a, r, 0, s, o));
|
|
5735
5735
|
else {
|
|
5736
5736
|
let E = 0, W = null, k;
|
|
5737
5737
|
if (e.getToken() & 143360 || e.getToken() === -2147483528 || e.getToken() === -2147483527)
|
|
5738
5738
|
if (e.getToken() === -2147483527 && (h |= 16), W = V(e, t), e.getToken() === 18 || e.getToken() === 1074790415 || e.getToken() === 1077936155)
|
|
5739
|
-
if (E |= 4, t & 1 && (w & 537079808) === 537079808 ? h |= 16 : ut(e, t, a, w, 0), i?.addVarOrBlock(t, C, a,
|
|
5739
|
+
if (E |= 4, t & 1 && (w & 537079808) === 537079808 ? h |= 16 : ut(e, t, a, w, 0), i?.addVarOrBlock(t, C, a, r), T(e, t | 32, 1077936155)) {
|
|
5740
5740
|
h |= 8;
|
|
5741
5741
|
const S = R(e, t, n, 1, s, e.tokenStart);
|
|
5742
5742
|
h |= e.destructible & 256 ? 256 : 0 | e.destructible & 128 ? 128 : 0, k = e.finishNode({
|
|
@@ -5752,8 +5752,8 @@ function ue(e, t, i, n, u, s, o, a, l) {
|
|
|
5752
5752
|
const Ve = e.getToken(), ke = e.tokenValue;
|
|
5753
5753
|
k = Z(e, t, n, a, 0, 1, s, 1, S);
|
|
5754
5754
|
const le = e.getToken();
|
|
5755
|
-
k = P(e, t, n, k, s, 0, S), e.getToken() === 18 || e.getToken() === 1074790415 ? le === 1077936155 || le === 1074790415 || le === 18 ? (h |= e.destructible & 128 ? 128 : 0, e.assignable & 2 ? h |= 16 : (Ve & 143360) === 143360 && i?.addVarOrBlock(t, ke, a,
|
|
5756
|
-
} else (e.getToken() & 2097152) === 2097152 ? (k = e.getToken() === 69271571 ? ne(e, t, i, n, 0, s, o, a,
|
|
5755
|
+
k = P(e, t, n, k, s, 0, S), e.getToken() === 18 || e.getToken() === 1074790415 ? le === 1077936155 || le === 1074790415 || le === 18 ? (h |= e.destructible & 128 ? 128 : 0, e.assignable & 2 ? h |= 16 : (Ve & 143360) === 143360 && i?.addVarOrBlock(t, ke, a, r)) : h |= e.assignable & 1 ? 32 : 16 : (e.getToken() & 4194304) === 4194304 ? (e.assignable & 2 ? h |= 16 : le !== 1077936155 ? h |= 32 : i?.addVarOrBlock(t, ke, a, r), k = O(e, t, n, s, o, S, k)) : (h |= 16, (e.getToken() & 8388608) === 8388608 && (k = ye(e, t, n, 1, S, 4, le, k)), T(e, t | 32, 22) && (k = Ee(e, t, n, k, S)));
|
|
5756
|
+
} else (e.getToken() & 2097152) === 2097152 ? (k = e.getToken() === 69271571 ? ne(e, t, i, n, 0, s, o, a, r) : ue(e, t, i, n, 0, s, o, a, r), h = e.destructible, e.assignable = h & 16 ? 2 : 1, e.getToken() === 18 || e.getToken() === 1074790415 ? e.assignable & 2 && (h |= 16) : e.destructible & 8 ? e.report(71) : (k = P(e, t, n, k, s, 0, S), h = e.assignable & 2 ? 16 : 0, (e.getToken() & 4194304) === 4194304 ? k = Ze(e, t, n, s, o, S, k) : ((e.getToken() & 8388608) === 8388608 && (k = ye(e, t, n, 1, S, 4, w, k)), T(e, t | 32, 22) && (k = Ee(e, t, n, k, S)), h |= e.assignable & 2 ? 16 : 32))) : (k = ie(e, t, n, 1, s, 1), h |= e.assignable & 1 ? 32 : 16, e.getToken() === 18 || e.getToken() === 1074790415 ? e.assignable & 2 && (h |= 16) : (k = P(e, t, n, k, s, 0, S), h = e.assignable & 2 ? 16 : 0, e.getToken() !== 18 && w !== 1074790415 && (e.getToken() !== 1077936155 && (h |= 16), k = O(e, t, n, s, o, S, k))));
|
|
5757
5757
|
} else e.getToken() === 69271571 ? (h |= 16, w === 209005 && (E |= 16), E |= (w === 209008 ? 256 : w === 209009 ? 512 : 1) | 2, W = Se(e, t, n, s), h |= e.assignable, k = oe(e, t, n, E, s, e.tokenStart)) : e.getToken() & 143360 ? (h |= 16, w === -2147483528 && e.report(95), w === 209005 ? (e.flags & 1 && e.report(132), E |= 17) : w === 209008 ? E |= 256 : w === 209009 ? E |= 512 : e.report(0), W = V(e, t), k = oe(e, t, n, E, s, e.tokenStart)) : e.getToken() === 67174411 ? (h |= 16, E |= 1, k = oe(e, t, n, E, s, e.tokenStart)) : e.getToken() === 8391476 ? (h |= 16, w === 209008 ? e.report(42) : w === 209009 ? e.report(43) : w !== 209005 && e.report(30, N[52]), m(e, t), E |= 9 | (w === 209005 ? 16 : 0), e.getToken() & 143360 ? W = V(e, t) : (e.getToken() & 134217728) === 134217728 ? W = J(e, t) : e.getToken() === 69271571 ? (E |= 2, W = Se(e, t, n, s), h |= e.assignable) : e.report(30, N[e.getToken() & 255]), k = oe(e, t, n, E, s, e.tokenStart)) : (e.getToken() & 134217728) === 134217728 ? (w === 209005 && (E |= 16), E |= w === 209008 ? 256 : w === 209009 ? 512 : 1, h |= 16, W = J(e, t), k = oe(e, t, n, E, s, e.tokenStart)) : e.report(133);
|
|
5758
5758
|
else if ((e.getToken() & 134217728) === 134217728)
|
|
5759
5759
|
if (W = J(e, t), e.getToken() === 21) {
|
|
@@ -5762,8 +5762,8 @@ function ue(e, t, i, n, u, s, o, a, l) {
|
|
|
5762
5762
|
if (C === "__proto__" && d++, e.getToken() & 143360) {
|
|
5763
5763
|
k = Z(e, t, n, a, 0, 1, s, 1, S);
|
|
5764
5764
|
const { tokenValue: Ve } = e, ke = e.getToken();
|
|
5765
|
-
k = P(e, t, n, k, s, 0, S), e.getToken() === 18 || e.getToken() === 1074790415 ? ke === 1077936155 || ke === 1074790415 || ke === 18 ? e.assignable & 2 ? h |= 16 : i?.addVarOrBlock(t, Ve, a,
|
|
5766
|
-
} else (e.getToken() & 2097152) === 2097152 ? (k = e.getToken() === 69271571 ? ne(e, t, i, n, 0, s, o, a,
|
|
5765
|
+
k = P(e, t, n, k, s, 0, S), e.getToken() === 18 || e.getToken() === 1074790415 ? ke === 1077936155 || ke === 1074790415 || ke === 18 ? e.assignable & 2 ? h |= 16 : i?.addVarOrBlock(t, Ve, a, r) : h |= e.assignable & 1 ? 32 : 16 : e.getToken() === 1077936155 ? (e.assignable & 2 && (h |= 16), k = O(e, t, n, s, o, S, k)) : (h |= 16, k = O(e, t, n, s, o, S, k));
|
|
5766
|
+
} else (e.getToken() & 2097152) === 2097152 ? (k = e.getToken() === 69271571 ? ne(e, t, i, n, 0, s, o, a, r) : ue(e, t, i, n, 0, s, o, a, r), h = e.destructible, e.assignable = h & 16 ? 2 : 1, e.getToken() === 18 || e.getToken() === 1074790415 ? e.assignable & 2 && (h |= 16) : (e.destructible & 8) !== 8 && (k = P(e, t, n, k, s, 0, S), h = e.assignable & 2 ? 16 : 0, (e.getToken() & 4194304) === 4194304 ? k = Ze(e, t, n, s, o, S, k) : ((e.getToken() & 8388608) === 8388608 && (k = ye(e, t, n, 1, S, 4, w, k)), T(e, t | 32, 22) && (k = Ee(e, t, n, k, S)), h |= e.assignable & 2 ? 16 : 32))) : (k = ie(e, t, n, 1, 0, 1), h |= e.assignable & 1 ? 32 : 16, e.getToken() === 18 || e.getToken() === 1074790415 ? e.assignable & 2 && (h |= 16) : (k = P(e, t, n, k, s, 0, S), h = e.assignable & 1 ? 0 : 16, e.getToken() !== 18 && e.getToken() !== 1074790415 && (e.getToken() !== 1077936155 && (h |= 16), k = O(e, t, n, s, o, S, k))));
|
|
5767
5767
|
} else e.getToken() === 67174411 ? (E |= 1, k = oe(e, t, n, E, s, e.tokenStart), h = e.assignable | 16) : e.report(134);
|
|
5768
5768
|
else if (e.getToken() === 69271571)
|
|
5769
5769
|
if (W = Se(e, t, n, s), h |= e.destructible & 256 ? 256 : 0, E |= 2, e.getToken() === 21) {
|
|
@@ -5772,8 +5772,8 @@ function ue(e, t, i, n, u, s, o, a, l) {
|
|
|
5772
5772
|
if (e.getToken() & 143360) {
|
|
5773
5773
|
k = Z(e, t, n, a, 0, 1, s, 1, S);
|
|
5774
5774
|
const le = e.getToken();
|
|
5775
|
-
k = P(e, t, n, k, s, 0, S), (e.getToken() & 4194304) === 4194304 ? (h |= e.assignable & 2 ? 16 : le === 1077936155 ? 0 : 32, k = Ze(e, t, n, s, o, S, k)) : e.getToken() === 18 || e.getToken() === 1074790415 ? le === 1077936155 || le === 1074790415 || le === 18 ? e.assignable & 2 ? h |= 16 : (ke & 143360) === 143360 && i?.addVarOrBlock(t, Ve, a,
|
|
5776
|
-
} else (e.getToken() & 2097152) === 2097152 ? (k = e.getToken() === 69271571 ? ne(e, t, i, n, 0, s, o, a,
|
|
5775
|
+
k = P(e, t, n, k, s, 0, S), (e.getToken() & 4194304) === 4194304 ? (h |= e.assignable & 2 ? 16 : le === 1077936155 ? 0 : 32, k = Ze(e, t, n, s, o, S, k)) : e.getToken() === 18 || e.getToken() === 1074790415 ? le === 1077936155 || le === 1074790415 || le === 18 ? e.assignable & 2 ? h |= 16 : (ke & 143360) === 143360 && i?.addVarOrBlock(t, Ve, a, r) : h |= e.assignable & 1 ? 32 : 16 : (h |= 16, k = O(e, t, n, s, o, S, k));
|
|
5776
|
+
} else (e.getToken() & 2097152) === 2097152 ? (k = e.getToken() === 69271571 ? ne(e, t, i, n, 0, s, o, a, r) : ue(e, t, i, n, 0, s, o, a, r), h = e.destructible, e.assignable = h & 16 ? 2 : 1, e.getToken() === 18 || e.getToken() === 1074790415 ? e.assignable & 2 && (h |= 16) : h & 8 ? e.report(62) : (k = P(e, t, n, k, s, 0, S), h = e.assignable & 2 ? h | 16 : 0, (e.getToken() & 4194304) === 4194304 ? (e.getToken() !== 1077936155 && (h |= 16), k = Ze(e, t, n, s, o, S, k)) : ((e.getToken() & 8388608) === 8388608 && (k = ye(e, t, n, 1, S, 4, w, k)), T(e, t | 32, 22) && (k = Ee(e, t, n, k, S)), h |= e.assignable & 2 ? 16 : 32))) : (k = ie(e, t, n, 1, 0, 1), h |= e.assignable & 1 ? 32 : 16, e.getToken() === 18 || e.getToken() === 1074790415 ? e.assignable & 2 && (h |= 16) : (k = P(e, t, n, k, s, 0, S), h = e.assignable & 1 ? 0 : 16, e.getToken() !== 18 && e.getToken() !== 1074790415 && (e.getToken() !== 1077936155 && (h |= 16), k = O(e, t, n, s, o, S, k))));
|
|
5777
5777
|
} else e.getToken() === 67174411 ? (E |= 1, k = oe(e, t, n, E, s, e.tokenStart), h = 16) : e.report(44);
|
|
5778
5778
|
else if (w === 8391476)
|
|
5779
5779
|
if (p(e, t | 32, 8391476), E |= 8, e.getToken() & 143360) {
|
|
@@ -5812,7 +5812,7 @@ function Gu(e, t, i, n, u, s, o) {
|
|
|
5812
5812
|
if (e.flags = (e.flags | 128) ^ 128, e.getToken() === 16)
|
|
5813
5813
|
return u & 512 && e.report(37, "Setter", "one", ""), m(e, t), a;
|
|
5814
5814
|
u & 256 && e.report(37, "Getter", "no", "s"), u & 512 && e.getToken() === 14 && e.report(38), t = (t | 131072) ^ 131072;
|
|
5815
|
-
let
|
|
5815
|
+
let r = 0, f = 0;
|
|
5816
5816
|
for (; e.getToken() !== 18; ) {
|
|
5817
5817
|
let c = null;
|
|
5818
5818
|
const { tokenStart: h } = e;
|
|
@@ -5825,10 +5825,10 @@ function Gu(e, t, i, n, u, s, o) {
|
|
|
5825
5825
|
right: d
|
|
5826
5826
|
}, h);
|
|
5827
5827
|
}
|
|
5828
|
-
if (
|
|
5828
|
+
if (r++, a.push(c), !T(e, t, 18) || e.getToken() === 16)
|
|
5829
5829
|
break;
|
|
5830
5830
|
}
|
|
5831
|
-
return u & 512 &&
|
|
5831
|
+
return u & 512 && r !== 1 && e.report(37, "Setter", "one", ""), i?.reportScopeError(), f && (e.flags |= 128), p(e, t, 16), a;
|
|
5832
5832
|
}
|
|
5833
5833
|
function Se(e, t, i, n) {
|
|
5834
5834
|
m(e, t | 32);
|
|
@@ -5839,9 +5839,9 @@ function es(e, t, i, n, u, s, o) {
|
|
|
5839
5839
|
e.flags = (e.flags | 128) ^ 128;
|
|
5840
5840
|
const a = e.tokenStart;
|
|
5841
5841
|
m(e, t | 32 | 262144);
|
|
5842
|
-
const
|
|
5842
|
+
const r = e.createScopeIfLexical()?.createChildScope(512);
|
|
5843
5843
|
if (t = (t | 131072) ^ 131072, T(e, t, 16))
|
|
5844
|
-
return ot(e, t,
|
|
5844
|
+
return ot(e, t, r, i, [], n, 0, o);
|
|
5845
5845
|
let f = 0;
|
|
5846
5846
|
e.destructible &= -385;
|
|
5847
5847
|
let c, h = [], d = 0, y = 0, C = 0;
|
|
@@ -5849,11 +5849,11 @@ function es(e, t, i, n, u, s, o) {
|
|
|
5849
5849
|
for (e.assignable = 1; e.getToken() !== 16; ) {
|
|
5850
5850
|
const { tokenStart: w } = e, E = e.getToken();
|
|
5851
5851
|
if (E & 143360)
|
|
5852
|
-
|
|
5852
|
+
r?.addBlockName(t, e.tokenValue, 1, 0), (E & 537079808) === 537079808 ? y = 1 : (E & 36864) === 36864 && (C = 1), c = Z(e, t, i, u, 0, 1, 1, 1, w), e.getToken() === 16 || e.getToken() === 18 ? e.assignable & 2 && (f |= 16, y = 1) : (e.getToken() === 1077936155 ? y = 1 : f |= 16, c = P(e, t, i, c, 1, 0, w), e.getToken() !== 16 && e.getToken() !== 18 && (c = O(e, t, i, 1, 0, w, c)));
|
|
5853
5853
|
else if ((E & 2097152) === 2097152)
|
|
5854
|
-
c = E === 2162700 ? ue(e, t | 262144,
|
|
5854
|
+
c = E === 2162700 ? ue(e, t | 262144, r, i, 0, 1, 0, u, s) : ne(e, t | 262144, r, i, 0, 1, 0, u, s), f |= e.destructible, y = 1, e.assignable = 2, e.getToken() !== 16 && e.getToken() !== 18 && (f & 8 && e.report(122), c = P(e, t, i, c, 0, 0, w), f |= 16, e.getToken() !== 16 && e.getToken() !== 18 && (c = O(e, t, i, 0, 0, w, c)));
|
|
5855
5855
|
else if (E === 14) {
|
|
5856
|
-
c = Ne(e, t,
|
|
5856
|
+
c = Ne(e, t, r, i, 16, u, s, 0, 1, 0), e.destructible & 16 && e.report(74), y = 1, d && (e.getToken() === 16 || e.getToken() === 18) && h.push(c), f |= 8;
|
|
5857
5857
|
break;
|
|
5858
5858
|
} else {
|
|
5859
5859
|
if (f |= 16, c = R(e, t, i, 1, 1, w), d && (e.getToken() === 16 || e.getToken() === 18) && h.push(c), e.getToken() === 18 && (d || (d = 1, h = [c])), d) {
|
|
@@ -5879,7 +5879,7 @@ function es(e, t, i, n, u, s, o) {
|
|
|
5879
5879
|
return d && (e.assignable = 2, c = e.finishNode({
|
|
5880
5880
|
type: "SequenceExpression",
|
|
5881
5881
|
expressions: h
|
|
5882
|
-
}, D)), p(e, t, 16), f & 16 && f & 8 && e.report(151), f |= e.destructible & 256 ? 256 : 0 | e.destructible & 128 ? 128 : 0, e.getToken() === 10 ? (f & 48 && e.report(49), t & 2050 && f & 128 && e.report(31), t & 1025 && f & 256 && e.report(32), y && (e.flags |= 128), C && (e.flags |= 256), ot(e, t,
|
|
5882
|
+
}, D)), p(e, t, 16), f & 16 && f & 8 && e.report(151), f |= e.destructible & 256 ? 256 : 0 | e.destructible & 128 ? 128 : 0, e.getToken() === 10 ? (f & 48 && e.report(49), t & 2050 && f & 128 && e.report(31), t & 1025 && f & 256 && e.report(32), y && (e.flags |= 128), C && (e.flags |= 256), ot(e, t, r, i, d ? h : [c], n, 0, o)) : (f & 64 && e.report(63), f & 8 && e.report(144), e.destructible = (e.destructible | 256) ^ 256 | f, e.options.preserveParens ? e.finishNode({
|
|
5883
5883
|
type: "ParenthesizedExpression",
|
|
5884
5884
|
expression: c
|
|
5885
5885
|
}, a) : c);
|
|
@@ -5890,29 +5890,29 @@ function Kt(e, t, i) {
|
|
|
5890
5890
|
(e.getToken() & 537079808) === 537079808 ? s = 1 : (e.getToken() & 36864) === 36864 && (o = 1);
|
|
5891
5891
|
const a = V(e, t);
|
|
5892
5892
|
if (e.assignable = 1, e.getToken() === 10) {
|
|
5893
|
-
const
|
|
5894
|
-
return s && (e.flags |= 128), o && (e.flags |= 256), $e(e, t,
|
|
5893
|
+
const r = e.options.lexical ? gt(e, t, u) : void 0;
|
|
5894
|
+
return s && (e.flags |= 128), o && (e.flags |= 256), $e(e, t, r, i, [a], 0, n);
|
|
5895
5895
|
}
|
|
5896
5896
|
return a;
|
|
5897
5897
|
}
|
|
5898
|
-
function bt(e, t, i, n, u, s, o, a,
|
|
5898
|
+
function bt(e, t, i, n, u, s, o, a, r) {
|
|
5899
5899
|
o || e.report(57), s && e.report(51), e.flags &= -129;
|
|
5900
5900
|
const f = e.options.lexical ? gt(e, t, n) : void 0;
|
|
5901
|
-
return $e(e, t, f, i, [u], a,
|
|
5901
|
+
return $e(e, t, f, i, [u], a, r);
|
|
5902
5902
|
}
|
|
5903
5903
|
function ot(e, t, i, n, u, s, o, a) {
|
|
5904
5904
|
s || e.report(57);
|
|
5905
|
-
for (let
|
|
5906
|
-
re(e, u[
|
|
5905
|
+
for (let r = 0; r < u.length; ++r)
|
|
5906
|
+
re(e, u[r]);
|
|
5907
5907
|
return $e(e, t, i, n, u, o, a);
|
|
5908
5908
|
}
|
|
5909
5909
|
function $e(e, t, i, n, u, s, o) {
|
|
5910
5910
|
e.flags & 1 && e.report(48), p(e, t | 32, 10);
|
|
5911
5911
|
const a = 535552;
|
|
5912
5912
|
t = (t | a) ^ a | (s ? 2048 : 0);
|
|
5913
|
-
const
|
|
5913
|
+
const r = e.getToken() !== 2162700;
|
|
5914
5914
|
let f;
|
|
5915
|
-
if (i?.reportScopeError(),
|
|
5915
|
+
if (i?.reportScopeError(), r)
|
|
5916
5916
|
e.flags = (e.flags | 512 | 256 | 64 | 4096) ^ 4928, f = R(e, t, n, 1, 0, e.tokenStart);
|
|
5917
5917
|
else {
|
|
5918
5918
|
i = i?.createChildScope(64);
|
|
@@ -5936,7 +5936,7 @@ function $e(e, t, i, n, u, s, o) {
|
|
|
5936
5936
|
params: u,
|
|
5937
5937
|
body: f,
|
|
5938
5938
|
async: s === 1,
|
|
5939
|
-
expression:
|
|
5939
|
+
expression: r,
|
|
5940
5940
|
generator: !1
|
|
5941
5941
|
}, o);
|
|
5942
5942
|
}
|
|
@@ -5948,18 +5948,18 @@ function Ji(e, t, i, n, u, s) {
|
|
|
5948
5948
|
t = (t | 131072) ^ 131072;
|
|
5949
5949
|
let a = 0;
|
|
5950
5950
|
for (; e.getToken() !== 18; ) {
|
|
5951
|
-
let
|
|
5951
|
+
let r;
|
|
5952
5952
|
const { tokenStart: f } = e, c = e.getToken();
|
|
5953
|
-
if (c & 143360 ? ((t & 1) === 0 && ((c & 36864) === 36864 && (e.flags |= 256), (c & 537079808) === 537079808 && (e.flags |= 512)),
|
|
5953
|
+
if (c & 143360 ? ((t & 1) === 0 && ((c & 36864) === 36864 && (e.flags |= 256), (c & 537079808) === 537079808 && (e.flags |= 512)), r = Yt(e, t, i, s | 1, 0)) : (c === 2162700 ? r = ue(e, t, i, n, 1, u, 1, s, 0) : c === 69271571 ? r = ne(e, t, i, n, 1, u, 1, s, 0) : c === 14 ? r = Ne(e, t, i, n, 16, s, 0, 0, u, 1) : e.report(30, N[c & 255]), a = 1, e.destructible & 48 && e.report(50)), e.getToken() === 1077936155) {
|
|
5954
5954
|
m(e, t | 32), a = 1;
|
|
5955
5955
|
const h = R(e, t, n, 1, u, e.tokenStart);
|
|
5956
|
-
|
|
5956
|
+
r = e.finishNode({
|
|
5957
5957
|
type: "AssignmentPattern",
|
|
5958
|
-
left:
|
|
5958
|
+
left: r,
|
|
5959
5959
|
right: h
|
|
5960
5960
|
}, f);
|
|
5961
5961
|
}
|
|
5962
|
-
if (o.push(
|
|
5962
|
+
if (o.push(r), !T(e, t, 18) || e.getToken() === 16)
|
|
5963
5963
|
break;
|
|
5964
5964
|
}
|
|
5965
5965
|
return a && (e.flags |= 128), (a || t & 1) && i?.reportScopeError(), p(e, t, 16), o;
|
|
@@ -5979,12 +5979,12 @@ function it(e, t, i, n, u, s) {
|
|
|
5979
5979
|
}, s), 0, s);
|
|
5980
5980
|
} else if (o === 69271571) {
|
|
5981
5981
|
m(e, t | 32);
|
|
5982
|
-
const { tokenStart: a } = e,
|
|
5982
|
+
const { tokenStart: a } = e, r = z(e, t, i, u, 1, a);
|
|
5983
5983
|
return p(e, t, 20), e.assignable = 1, it(e, t, i, e.finishNode({
|
|
5984
5984
|
type: "MemberExpression",
|
|
5985
5985
|
object: n,
|
|
5986
5986
|
computed: !0,
|
|
5987
|
-
property:
|
|
5987
|
+
property: r,
|
|
5988
5988
|
optional: !1
|
|
5989
5989
|
}, s), 0, s);
|
|
5990
5990
|
} else if (o === 67174408 || o === 67174409)
|
|
@@ -6006,10 +6006,10 @@ function ts(e, t, i, n) {
|
|
|
6006
6006
|
e.assignable = 2, (e.getToken() & 16842752) === 16842752 && e.report(65, N[e.getToken() & 255]);
|
|
6007
6007
|
const a = Z(e, t, i, 2, 1, 0, n, 1, o);
|
|
6008
6008
|
t = (t | 131072) ^ 131072, e.getToken() === 67108990 && e.report(168);
|
|
6009
|
-
const
|
|
6009
|
+
const r = it(e, t, i, a, n, o);
|
|
6010
6010
|
return e.assignable = 2, e.finishNode({
|
|
6011
6011
|
type: "NewExpression",
|
|
6012
|
-
callee:
|
|
6012
|
+
callee: r,
|
|
6013
6013
|
arguments: e.getToken() === 67174411 ? $t(e, t, i, n) : []
|
|
6014
6014
|
}, u);
|
|
6015
6015
|
}
|
|
@@ -6024,16 +6024,16 @@ function is(e, t, i, n) {
|
|
|
6024
6024
|
function Hi(e, t, i, n, u) {
|
|
6025
6025
|
return e.getToken() === 209006 && e.report(31), t & 1025 && e.getToken() === 241771 && e.report(32), dt(e, t, e.getToken()), (e.getToken() & 36864) === 36864 && (e.flags |= 256), bt(e, t & -524289 | 2048, i, e.tokenValue, V(e, t), 0, n, 1, u);
|
|
6026
6026
|
}
|
|
6027
|
-
function Qt(e, t, i, n, u, s, o, a,
|
|
6027
|
+
function Qt(e, t, i, n, u, s, o, a, r) {
|
|
6028
6028
|
m(e, t | 32);
|
|
6029
6029
|
const f = e.createScopeIfLexical()?.createChildScope(512);
|
|
6030
6030
|
if (t = (t | 131072) ^ 131072, T(e, t, 16))
|
|
6031
|
-
return e.getToken() === 10 ? (a & 1 && e.report(48), ot(e, t, f, i, [], u, 1,
|
|
6031
|
+
return e.getToken() === 10 ? (a & 1 && e.report(48), ot(e, t, f, i, [], u, 1, r)) : e.finishNode({
|
|
6032
6032
|
type: "CallExpression",
|
|
6033
6033
|
callee: n,
|
|
6034
6034
|
arguments: [],
|
|
6035
6035
|
optional: !1
|
|
6036
|
-
},
|
|
6036
|
+
}, r);
|
|
6037
6037
|
let c = 0, h = null, d = 0;
|
|
6038
6038
|
e.destructible = (e.destructible | 256 | 128) ^ 384;
|
|
6039
6039
|
const y = [];
|
|
@@ -6042,7 +6042,7 @@ function Qt(e, t, i, n, u, s, o, a, l) {
|
|
|
6042
6042
|
if (D & 143360)
|
|
6043
6043
|
f?.addBlockName(t, e.tokenValue, s, 0), (D & 537079808) === 537079808 ? e.flags |= 512 : (D & 36864) === 36864 && (e.flags |= 256), h = Z(e, t, i, s, 0, 1, 1, 1, C), e.getToken() === 16 || e.getToken() === 18 ? e.assignable & 2 && (c |= 16, d = 1) : (e.getToken() === 1077936155 ? d = 1 : c |= 16, h = P(e, t, i, h, 1, 0, C), e.getToken() !== 16 && e.getToken() !== 18 && (h = O(e, t, i, 1, 0, C, h)));
|
|
6044
6044
|
else if (D & 2097152)
|
|
6045
|
-
h = D === 2162700 ? ue(e, t, f, i, 0, 1, 0, s, o) : ne(e, t, f, i, 0, 1, 0, s, o), c |= e.destructible, d = 1, e.getToken() !== 16 && e.getToken() !== 18 && (c & 8 && e.report(122), h = P(e, t, i, h, 0, 0, C), c |= 16, (e.getToken() & 8388608) === 8388608 && (h = ye(e, t, i, 1,
|
|
6045
|
+
h = D === 2162700 ? ue(e, t, f, i, 0, 1, 0, s, o) : ne(e, t, f, i, 0, 1, 0, s, o), c |= e.destructible, d = 1, e.getToken() !== 16 && e.getToken() !== 18 && (c & 8 && e.report(122), h = P(e, t, i, h, 0, 0, C), c |= 16, (e.getToken() & 8388608) === 8388608 && (h = ye(e, t, i, 1, r, 4, D, h)), T(e, t | 32, 22) && (h = Ee(e, t, i, h, r)));
|
|
6046
6046
|
else if (D === 14)
|
|
6047
6047
|
h = Ne(e, t, f, i, 16, s, o, 1, 1, 0), c |= (e.getToken() === 16 ? 0 : 16) | e.destructible, d = 1;
|
|
6048
6048
|
else {
|
|
@@ -6053,17 +6053,17 @@ function Qt(e, t, i, n, u, s, o, a, l) {
|
|
|
6053
6053
|
callee: n,
|
|
6054
6054
|
arguments: y,
|
|
6055
6055
|
optional: !1
|
|
6056
|
-
},
|
|
6056
|
+
}, r);
|
|
6057
6057
|
}
|
|
6058
6058
|
if (y.push(h), !T(e, t | 32, 18))
|
|
6059
6059
|
break;
|
|
6060
6060
|
}
|
|
6061
|
-
return p(e, t, 16), c |= e.destructible & 256 ? 256 : 0 | e.destructible & 128 ? 128 : 0, e.getToken() === 10 ? (c & 48 && e.report(27), (e.flags & 1 || a & 1) && e.report(48), c & 128 && e.report(31), t & 1025 && c & 256 && e.report(32), d && (e.flags |= 128), ot(e, t | 2048, f, i, y, u, 1,
|
|
6061
|
+
return p(e, t, 16), c |= e.destructible & 256 ? 256 : 0 | e.destructible & 128 ? 128 : 0, e.getToken() === 10 ? (c & 48 && e.report(27), (e.flags & 1 || a & 1) && e.report(48), c & 128 && e.report(31), t & 1025 && c & 256 && e.report(32), d && (e.flags |= 128), ot(e, t | 2048, f, i, y, u, 1, r)) : (c & 64 && e.report(63), c & 8 && e.report(62), e.assignable = 2, e.finishNode({
|
|
6062
6062
|
type: "CallExpression",
|
|
6063
6063
|
callee: n,
|
|
6064
6064
|
arguments: y,
|
|
6065
6065
|
optional: !1
|
|
6066
|
-
},
|
|
6066
|
+
}, r));
|
|
6067
6067
|
}
|
|
6068
6068
|
function ns(e, t) {
|
|
6069
6069
|
const { tokenRaw: i, tokenRegExp: n, tokenValue: u, tokenStart: s } = e;
|
|
@@ -6078,16 +6078,16 @@ function ns(e, t) {
|
|
|
6078
6078
|
function _t(e, t, i, n, u) {
|
|
6079
6079
|
let s, o;
|
|
6080
6080
|
e.leadingDecorators.decorators.length ? (e.getToken() === 132 && e.report(30, "@"), s = e.leadingDecorators.start, o = [...e.leadingDecorators.decorators], e.leadingDecorators.decorators.length = 0) : (s = e.tokenStart, o = kt(e, t, n)), t = (t | 16384 | 1) ^ 16384, m(e, t);
|
|
6081
|
-
let a = null,
|
|
6081
|
+
let a = null, r = null;
|
|
6082
6082
|
const { tokenValue: f } = e;
|
|
6083
6083
|
e.getToken() & 4096 && e.getToken() !== 20565 ? (Bi(e, t, e.getToken()) && e.report(118), (e.getToken() & 537079808) === 537079808 && e.report(119), i && (i.addBlockName(t, f, 32, 0), u && u & 2 && e.declareUnboundVariable(f)), a = V(e, t)) : (u & 1) === 0 && e.report(39, "Class");
|
|
6084
6084
|
let c = t;
|
|
6085
|
-
T(e, t | 32, 20565) ? (
|
|
6085
|
+
T(e, t | 32, 20565) ? (r = ie(e, t, n, 0, 0, 0), c |= 512) : c = (c | 512) ^ 512;
|
|
6086
6086
|
const h = zi(e, c, t, i, n, 2, 8, 0);
|
|
6087
6087
|
return e.finishNode({
|
|
6088
6088
|
type: "ClassDeclaration",
|
|
6089
6089
|
id: a,
|
|
6090
|
-
superClass:
|
|
6090
|
+
superClass: r,
|
|
6091
6091
|
body: h,
|
|
6092
6092
|
...e.options.next ? { decorators: o } : null
|
|
6093
6093
|
}, s);
|
|
@@ -6096,9 +6096,9 @@ function us(e, t, i, n, u) {
|
|
|
6096
6096
|
let s = null, o = null;
|
|
6097
6097
|
const a = kt(e, t, i);
|
|
6098
6098
|
t = (t | 1 | 16384) ^ 16384, m(e, t), e.getToken() & 4096 && e.getToken() !== 20565 && (Bi(e, t, e.getToken()) && e.report(118), (e.getToken() & 537079808) === 537079808 && e.report(119), s = V(e, t));
|
|
6099
|
-
let
|
|
6100
|
-
T(e, t | 32, 20565) ? (o = ie(e, t, i, 0, n, 0),
|
|
6101
|
-
const f = zi(e,
|
|
6099
|
+
let r = t;
|
|
6100
|
+
T(e, t | 32, 20565) ? (o = ie(e, t, i, 0, n, 0), r |= 512) : r = (r | 512) ^ 512;
|
|
6101
|
+
const f = zi(e, r, t, void 0, i, 2, 0, n);
|
|
6102
6102
|
return e.assignable = 2, e.finishNode({
|
|
6103
6103
|
type: "ClassExpression",
|
|
6104
6104
|
id: s,
|
|
@@ -6125,7 +6125,7 @@ function ss(e, t, i) {
|
|
|
6125
6125
|
}, n);
|
|
6126
6126
|
}
|
|
6127
6127
|
function zi(e, t, i, n, u, s, o, a) {
|
|
6128
|
-
const { tokenStart:
|
|
6128
|
+
const { tokenStart: r } = e, f = e.createPrivateScopeIfLexical(u);
|
|
6129
6129
|
p(e, t | 32, 2162700);
|
|
6130
6130
|
const c = 655360;
|
|
6131
6131
|
t = (t | c) ^ c;
|
|
@@ -6143,16 +6143,16 @@ function zi(e, t, i, n, u, s, o, a) {
|
|
|
6143
6143
|
return p(e, o & 8 ? t | 32 : t, 1074790415), f?.validatePrivateIdentifierRefs(), e.flags = e.flags & -33 | h, e.finishNode({
|
|
6144
6144
|
type: "ClassBody",
|
|
6145
6145
|
body: d
|
|
6146
|
-
},
|
|
6146
|
+
}, r);
|
|
6147
6147
|
}
|
|
6148
|
-
function Wi(e, t, i, n, u, s, o, a,
|
|
6148
|
+
function Wi(e, t, i, n, u, s, o, a, r, f) {
|
|
6149
6149
|
let c = a ? 32 : 0, h = null;
|
|
6150
6150
|
const d = e.getToken();
|
|
6151
6151
|
if (d & 176128 || d === -2147483528)
|
|
6152
6152
|
switch (h = V(e, t), d) {
|
|
6153
6153
|
case 36970:
|
|
6154
6154
|
if (!a && e.getToken() !== 67174411 && (e.getToken() & 1048576) !== 1048576 && e.getToken() !== 1077936155)
|
|
6155
|
-
return Wi(e, t, i, n, u, s, o, 1,
|
|
6155
|
+
return Wi(e, t, i, n, u, s, o, 1, r, f);
|
|
6156
6156
|
break;
|
|
6157
6157
|
case 209005:
|
|
6158
6158
|
if (e.getToken() !== 67174411 && (e.flags & 1) === 0) {
|
|
@@ -6184,7 +6184,7 @@ function Wi(e, t, i, n, u, s, o, a, l, f) {
|
|
|
6184
6184
|
break;
|
|
6185
6185
|
}
|
|
6186
6186
|
else if (d === 69271571)
|
|
6187
|
-
c |= 2, h = Se(e, u, n,
|
|
6187
|
+
c |= 2, h = Se(e, u, n, r);
|
|
6188
6188
|
else if ((d & 134217728) === 134217728)
|
|
6189
6189
|
h = J(e, t);
|
|
6190
6190
|
else if (d === 8391476)
|
|
@@ -6200,7 +6200,7 @@ function Wi(e, t, i, n, u, s, o, a, l, f) {
|
|
|
6200
6200
|
}
|
|
6201
6201
|
if (c & 1816 && (e.getToken() & 143360 || e.getToken() === -2147483528 || e.getToken() === -2147483527 ? h = V(e, t) : (e.getToken() & 134217728) === 134217728 ? h = J(e, t) : e.getToken() === 69271571 ? (c |= 2, h = Se(e, t, n, 0)) : e.getToken() === 130 ? (c |= 8192, h = at(e, t, n, c)) : e.report(135)), (c & 2) === 0 && (e.tokenValue === "constructor" ? ((e.getToken() & 1073741824) === 1073741824 ? e.report(129) : (c & 32) === 0 && e.getToken() === 67174411 && (c & 920 ? e.report(53, "accessor") : (t & 512) === 0 && (e.flags & 32 ? e.report(54) : e.flags |= 32)), c |= 64) : (c & 8192) === 0 && c & 32 && e.tokenValue === "prototype" && e.report(52)), c & 1024 || e.getToken() !== 67174411 && (c & 768) === 0)
|
|
6202
6202
|
return Re(e, t, n, h, c, o, f);
|
|
6203
|
-
const y = oe(e, t | 16, n, c,
|
|
6203
|
+
const y = oe(e, t | 16, n, c, r, e.tokenStart);
|
|
6204
6204
|
return e.finishNode({
|
|
6205
6205
|
type: "MethodDefinition",
|
|
6206
6206
|
kind: (c & 32) === 0 && c & 64 ? "constructor" : c & 256 ? "get" : c & 512 ? "set" : "method",
|
|
@@ -6224,10 +6224,10 @@ function Re(e, t, i, n, u, s, o) {
|
|
|
6224
6224
|
let a = null;
|
|
6225
6225
|
if (u & 8 && e.report(0), e.getToken() === 1077936155) {
|
|
6226
6226
|
m(e, t | 32);
|
|
6227
|
-
const { tokenStart:
|
|
6227
|
+
const { tokenStart: r } = e;
|
|
6228
6228
|
e.getToken() === 537079927 && e.report(119);
|
|
6229
6229
|
const f = 11264 | ((u & 64) === 0 ? 16896 : 0);
|
|
6230
|
-
t = (t | f) ^ f | (u & 8 ? 1024 : 0) | (u & 16 ? 2048 : 0) | (u & 64 ? 16384 : 0) | 256 | 65536, a = Z(e, t | 16, i, 2, 0, 1, 0, 1,
|
|
6230
|
+
t = (t | f) ^ f | (u & 8 ? 1024 : 0) | (u & 16 ? 2048 : 0) | (u & 64 ? 16384 : 0) | 256 | 65536, a = Z(e, t | 16, i, 2, 0, 1, 0, 1, r), ((e.getToken() & 1073741824) !== 1073741824 || (e.getToken() & 4194304) === 4194304) && (a = P(e, t | 16, i, a, 0, 0, r), a = O(e, t | 16, i, 0, 0, r, a));
|
|
6231
6231
|
}
|
|
6232
6232
|
return X(e, t), e.finishNode({
|
|
6233
6233
|
type: u & 1024 ? "AccessorProperty" : "PropertyDefinition",
|
|
@@ -6256,10 +6256,10 @@ function Yt(e, t, i, n, u) {
|
|
|
6256
6256
|
}
|
|
6257
6257
|
function pt(e, t, i, n, u) {
|
|
6258
6258
|
if (n || p(e, t, 8456256), e.getToken() === 8390721) {
|
|
6259
|
-
const
|
|
6259
|
+
const r = os(e, u), [f, c] = cs(e, t, i, n);
|
|
6260
6260
|
return e.finishNode({
|
|
6261
6261
|
type: "JSXFragment",
|
|
6262
|
-
openingFragment:
|
|
6262
|
+
openingFragment: r,
|
|
6263
6263
|
children: f,
|
|
6264
6264
|
closingFragment: c
|
|
6265
6265
|
}, u);
|
|
@@ -6269,8 +6269,8 @@ function pt(e, t, i, n, u) {
|
|
|
6269
6269
|
const a = ds(e, t, i, n, u);
|
|
6270
6270
|
if (!a.selfClosing) {
|
|
6271
6271
|
[o, s] = ls(e, t, i, n);
|
|
6272
|
-
const
|
|
6273
|
-
st(a.name) !==
|
|
6272
|
+
const r = st(s.name);
|
|
6273
|
+
st(a.name) !== r && e.report(155, r);
|
|
6274
6274
|
}
|
|
6275
6275
|
return e.finishNode({
|
|
6276
6276
|
type: "JSXElement",
|
|
@@ -6501,7 +6501,7 @@ var ee = { beforeExpr: !0 }, K = { startsExpr: !0 }, Gt = {};
|
|
|
6501
6501
|
function F(e, t) {
|
|
6502
6502
|
return t === void 0 && (t = {}), t.keyword = e, Gt[e] = new L(e, t);
|
|
6503
6503
|
}
|
|
6504
|
-
var
|
|
6504
|
+
var l = {
|
|
6505
6505
|
num: new L("num", K),
|
|
6506
6506
|
regexp: new L("regexp", K),
|
|
6507
6507
|
string: new L("string", K),
|
|
@@ -6747,13 +6747,13 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
|
|
|
6747
6747
|
}
|
|
6748
6748
|
function _s(e, t) {
|
|
6749
6749
|
return function(i, n, u, s, o, a) {
|
|
6750
|
-
var
|
|
6750
|
+
var r = {
|
|
6751
6751
|
type: i ? "Block" : "Line",
|
|
6752
6752
|
value: n,
|
|
6753
6753
|
start: u,
|
|
6754
6754
|
end: s
|
|
6755
6755
|
};
|
|
6756
|
-
e.locations && (
|
|
6756
|
+
e.locations && (r.loc = new Ct(this, o, a)), e.ranges && (r.range = [u, s]), t.push(r);
|
|
6757
6757
|
};
|
|
6758
6758
|
}
|
|
6759
6759
|
var Je = 1, Le = 2, ei = 4, un = 8, ti = 16, sn = 32, At = 64, on = 128, Te = 256, Ke = 512, vt = Je | Le | Te;
|
|
@@ -6766,7 +6766,7 @@ var rt = 0, ni = 1, be = 2, an = 3, rn = 4, ln = 5, j = function(t, i, n) {
|
|
|
6766
6766
|
t.allowReserved !== !0 && (u = xt[t.ecmaVersion >= 6 ? 6 : t.ecmaVersion === 5 ? 5 : 3], t.sourceType === "module" && (u += " await")), this.reservedWords = Ae(u);
|
|
6767
6767
|
var s = (u ? u + " " : "") + xt.strict;
|
|
6768
6768
|
this.reservedWordsStrict = Ae(s), this.reservedWordsStrictBind = Ae(s + " " + xt.strictBind), this.input = String(i), this.containsEsc = !1, n ? (this.pos = n, this.lineStart = this.input.lastIndexOf(`
|
|
6769
|
-
`, n - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(Q).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type =
|
|
6769
|
+
`, n - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(Q).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = l.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = t.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = /* @__PURE__ */ Object.create(null), this.pos === 0 && t.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(Je), this.regexpState = null, this.privateNameStack = [];
|
|
6770
6770
|
}, fe = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, canAwait: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 }, allowNewDotTarget: { configurable: !0 }, inClassStaticBlock: { configurable: !0 } };
|
|
6771
6771
|
j.prototype.parse = function() {
|
|
6772
6772
|
var t = this.options.program || this.startNode();
|
|
@@ -6850,7 +6850,7 @@ $.eat = function(e) {
|
|
|
6850
6850
|
return this.type === e ? (this.next(), !0) : !1;
|
|
6851
6851
|
};
|
|
6852
6852
|
$.isContextual = function(e) {
|
|
6853
|
-
return this.type ===
|
|
6853
|
+
return this.type === l.name && this.value === e && !this.containsEsc;
|
|
6854
6854
|
};
|
|
6855
6855
|
$.eatContextual = function(e) {
|
|
6856
6856
|
return this.isContextual(e) ? (this.next(), !0) : !1;
|
|
@@ -6859,14 +6859,14 @@ $.expectContextual = function(e) {
|
|
|
6859
6859
|
this.eatContextual(e) || this.unexpected();
|
|
6860
6860
|
};
|
|
6861
6861
|
$.canInsertSemicolon = function() {
|
|
6862
|
-
return this.type ===
|
|
6862
|
+
return this.type === l.eof || this.type === l.braceR || Q.test(this.input.slice(this.lastTokEnd, this.start));
|
|
6863
6863
|
};
|
|
6864
6864
|
$.insertSemicolon = function() {
|
|
6865
6865
|
if (this.canInsertSemicolon())
|
|
6866
6866
|
return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0;
|
|
6867
6867
|
};
|
|
6868
6868
|
$.semicolon = function() {
|
|
6869
|
-
!this.eat(
|
|
6869
|
+
!this.eat(l.semi) && !this.insertSemicolon() && this.unexpected();
|
|
6870
6870
|
};
|
|
6871
6871
|
$.afterTrailingComma = function(e, t) {
|
|
6872
6872
|
if (this.type === e)
|
|
@@ -6905,7 +6905,7 @@ $.isSimpleAssignTarget = function(e) {
|
|
|
6905
6905
|
var v = j.prototype;
|
|
6906
6906
|
v.parseTopLevel = function(e) {
|
|
6907
6907
|
var t = /* @__PURE__ */ Object.create(null);
|
|
6908
|
-
for (e.body || (e.body = []); this.type !==
|
|
6908
|
+
for (e.body || (e.body = []); this.type !== l.eof; ) {
|
|
6909
6909
|
var i = this.parseStatement(null, !0, t);
|
|
6910
6910
|
e.body.push(i);
|
|
6911
6911
|
}
|
|
@@ -6963,8 +6963,8 @@ v.isUsingKeyword = function(e, t) {
|
|
|
6963
6963
|
return !1;
|
|
6964
6964
|
}
|
|
6965
6965
|
if (t) {
|
|
6966
|
-
var a = n + 2,
|
|
6967
|
-
if (this.input.slice(n, a) === "of" && (a === this.input.length || !ve(
|
|
6966
|
+
var a = n + 2, r;
|
|
6967
|
+
if (this.input.slice(n, a) === "of" && (a === this.input.length || !ve(r = this.input.charCodeAt(a)) && !(r > 55295 && r < 56320)))
|
|
6968
6968
|
return !1;
|
|
6969
6969
|
}
|
|
6970
6970
|
var f = this.input.charCodeAt(n);
|
|
@@ -6978,50 +6978,50 @@ v.isUsing = function(e) {
|
|
|
6978
6978
|
};
|
|
6979
6979
|
v.parseStatement = function(e, t, i) {
|
|
6980
6980
|
var n = this.type, u = this.startNode(), s;
|
|
6981
|
-
switch (this.isLet(e) && (n =
|
|
6982
|
-
case
|
|
6983
|
-
case
|
|
6981
|
+
switch (this.isLet(e) && (n = l._var, s = "let"), n) {
|
|
6982
|
+
case l._break:
|
|
6983
|
+
case l._continue:
|
|
6984
6984
|
return this.parseBreakContinueStatement(u, n.keyword);
|
|
6985
|
-
case
|
|
6985
|
+
case l._debugger:
|
|
6986
6986
|
return this.parseDebuggerStatement(u);
|
|
6987
|
-
case
|
|
6987
|
+
case l._do:
|
|
6988
6988
|
return this.parseDoStatement(u);
|
|
6989
|
-
case
|
|
6989
|
+
case l._for:
|
|
6990
6990
|
return this.parseForStatement(u);
|
|
6991
|
-
case
|
|
6991
|
+
case l._function:
|
|
6992
6992
|
return e && (this.strict || e !== "if" && e !== "label") && this.options.ecmaVersion >= 6 && this.unexpected(), this.parseFunctionStatement(u, !1, !e);
|
|
6993
|
-
case
|
|
6993
|
+
case l._class:
|
|
6994
6994
|
return e && this.unexpected(), this.parseClass(u, !0);
|
|
6995
|
-
case
|
|
6995
|
+
case l._if:
|
|
6996
6996
|
return this.parseIfStatement(u);
|
|
6997
|
-
case
|
|
6997
|
+
case l._return:
|
|
6998
6998
|
return this.parseReturnStatement(u);
|
|
6999
|
-
case
|
|
6999
|
+
case l._switch:
|
|
7000
7000
|
return this.parseSwitchStatement(u);
|
|
7001
|
-
case
|
|
7001
|
+
case l._throw:
|
|
7002
7002
|
return this.parseThrowStatement(u);
|
|
7003
|
-
case
|
|
7003
|
+
case l._try:
|
|
7004
7004
|
return this.parseTryStatement(u);
|
|
7005
|
-
case
|
|
7006
|
-
case
|
|
7005
|
+
case l._const:
|
|
7006
|
+
case l._var:
|
|
7007
7007
|
return s = s || this.value, e && s !== "var" && this.unexpected(), this.parseVarStatement(u, s);
|
|
7008
|
-
case
|
|
7008
|
+
case l._while:
|
|
7009
7009
|
return this.parseWhileStatement(u);
|
|
7010
|
-
case
|
|
7010
|
+
case l._with:
|
|
7011
7011
|
return this.parseWithStatement(u);
|
|
7012
|
-
case
|
|
7012
|
+
case l.braceL:
|
|
7013
7013
|
return this.parseBlock(!0, u);
|
|
7014
|
-
case
|
|
7014
|
+
case l.semi:
|
|
7015
7015
|
return this.parseEmptyStatement(u);
|
|
7016
|
-
case
|
|
7017
|
-
case
|
|
7018
|
-
if (this.options.ecmaVersion > 10 && n ===
|
|
7016
|
+
case l._export:
|
|
7017
|
+
case l._import:
|
|
7018
|
+
if (this.options.ecmaVersion > 10 && n === l._import) {
|
|
7019
7019
|
H.lastIndex = this.pos;
|
|
7020
|
-
var o = H.exec(this.input), a = this.pos + o[0].length,
|
|
7021
|
-
if (
|
|
7020
|
+
var o = H.exec(this.input), a = this.pos + o[0].length, r = this.input.charCodeAt(a);
|
|
7021
|
+
if (r === 40 || r === 46)
|
|
7022
7022
|
return this.parseExpressionStatement(u, this.parseExpression());
|
|
7023
7023
|
}
|
|
7024
|
-
return this.options.allowImportExportEverywhere || (t || this.raise(this.start, "'import' and 'export' may only appear at the top level"), this.inModule || this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")), n ===
|
|
7024
|
+
return this.options.allowImportExportEverywhere || (t || this.raise(this.start, "'import' and 'export' may only appear at the top level"), this.inModule || this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")), n === l._import ? this.parseImport(u) : this.parseExport(u, i);
|
|
7025
7025
|
// If the statement does not start with a statement keyword or a
|
|
7026
7026
|
// brace, it's an ExpressionStatement or LabeledStatement. We
|
|
7027
7027
|
// simply start parsing an expression, and afterwards, if the
|
|
@@ -7034,12 +7034,12 @@ v.parseStatement = function(e, t, i) {
|
|
|
7034
7034
|
if (f)
|
|
7035
7035
|
return t && this.options.sourceType === "script" && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), f === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(u, !1, f), this.semicolon(), this.finishNode(u, "VariableDeclaration");
|
|
7036
7036
|
var c = this.value, h = this.parseExpression();
|
|
7037
|
-
return n ===
|
|
7037
|
+
return n === l.name && h.type === "Identifier" && this.eat(l.colon) ? this.parseLabeledStatement(u, c, h, e) : this.parseExpressionStatement(u, h);
|
|
7038
7038
|
}
|
|
7039
7039
|
};
|
|
7040
7040
|
v.parseBreakContinueStatement = function(e, t) {
|
|
7041
7041
|
var i = t === "break";
|
|
7042
|
-
this.next(), this.eat(
|
|
7042
|
+
this.next(), this.eat(l.semi) || this.insertSemicolon() ? e.label = null : this.type !== l.name ? this.unexpected() : (e.label = this.parseIdent(), this.semicolon());
|
|
7043
7043
|
for (var n = 0; n < this.labels.length; ++n) {
|
|
7044
7044
|
var u = this.labels[n];
|
|
7045
7045
|
if ((e.label == null || u.name === e.label.name) && (u.kind != null && (i || u.kind === "loop") || e.label && i))
|
|
@@ -7051,44 +7051,44 @@ v.parseDebuggerStatement = function(e) {
|
|
|
7051
7051
|
return this.next(), this.semicolon(), this.finishNode(e, "DebuggerStatement");
|
|
7052
7052
|
};
|
|
7053
7053
|
v.parseDoStatement = function(e) {
|
|
7054
|
-
return this.next(), this.labels.push(ui), e.body = this.parseStatement("do"), this.labels.pop(), this.expect(
|
|
7054
|
+
return this.next(), this.labels.push(ui), e.body = this.parseStatement("do"), this.labels.pop(), this.expect(l._while), e.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(l.semi) : this.semicolon(), this.finishNode(e, "DoWhileStatement");
|
|
7055
7055
|
};
|
|
7056
7056
|
v.parseForStatement = function(e) {
|
|
7057
7057
|
this.next();
|
|
7058
7058
|
var t = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
7059
|
-
if (this.labels.push(ui), this.enterScope(0), this.expect(
|
|
7059
|
+
if (this.labels.push(ui), this.enterScope(0), this.expect(l.parenL), this.type === l.semi)
|
|
7060
7060
|
return t > -1 && this.unexpected(t), this.parseFor(e, null);
|
|
7061
7061
|
var i = this.isLet();
|
|
7062
|
-
if (this.type ===
|
|
7062
|
+
if (this.type === l._var || this.type === l._const || i) {
|
|
7063
7063
|
var n = this.startNode(), u = i ? "let" : this.value;
|
|
7064
7064
|
return this.next(), this.parseVar(n, !0, u), this.finishNode(n, "VariableDeclaration"), this.parseForAfterInit(e, n, t);
|
|
7065
7065
|
}
|
|
7066
7066
|
var s = this.isContextual("let"), o = !1, a = this.isUsing(!0) ? "using" : this.isAwaitUsing(!0) ? "await using" : null;
|
|
7067
7067
|
if (a) {
|
|
7068
|
-
var
|
|
7069
|
-
return this.next(), a === "await using" && this.next(), this.parseVar(
|
|
7068
|
+
var r = this.startNode();
|
|
7069
|
+
return this.next(), a === "await using" && this.next(), this.parseVar(r, !0, a), this.finishNode(r, "VariableDeclaration"), this.parseForAfterInit(e, r, t);
|
|
7070
7070
|
}
|
|
7071
7071
|
var f = this.containsEsc, c = new wt(), h = this.start, d = t > -1 ? this.parseExprSubscripts(c, "await") : this.parseExpression(!0, c);
|
|
7072
|
-
return this.type ===
|
|
7072
|
+
return this.type === l._in || (o = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === l._in && this.unexpected(t), e.await = !0) : o && this.options.ecmaVersion >= 8 && (d.start === h && !f && d.type === "Identifier" && d.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = !1)), s && o && this.raise(d.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(d, !1, c), this.checkLValPattern(d), this.parseForIn(e, d)) : (this.checkExpressionErrors(c, !0), t > -1 && this.unexpected(t), this.parseFor(e, d));
|
|
7073
7073
|
};
|
|
7074
7074
|
v.parseForAfterInit = function(e, t, i) {
|
|
7075
|
-
return (this.type ===
|
|
7075
|
+
return (this.type === l._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && t.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === l._in ? i > -1 && this.unexpected(i) : e.await = i > -1), this.parseForIn(e, t)) : (i > -1 && this.unexpected(i), this.parseFor(e, t));
|
|
7076
7076
|
};
|
|
7077
7077
|
v.parseFunctionStatement = function(e, t, i) {
|
|
7078
7078
|
return this.next(), this.parseFunction(e, qe | (i ? 0 : Pt), !1, t);
|
|
7079
7079
|
};
|
|
7080
7080
|
v.parseIfStatement = function(e) {
|
|
7081
|
-
return this.next(), e.test = this.parseParenExpression(), e.consequent = this.parseStatement("if"), e.alternate = this.eat(
|
|
7081
|
+
return this.next(), e.test = this.parseParenExpression(), e.consequent = this.parseStatement("if"), e.alternate = this.eat(l._else) ? this.parseStatement("if") : null, this.finishNode(e, "IfStatement");
|
|
7082
7082
|
};
|
|
7083
7083
|
v.parseReturnStatement = function(e) {
|
|
7084
|
-
return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(
|
|
7084
|
+
return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(l.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()), this.finishNode(e, "ReturnStatement");
|
|
7085
7085
|
};
|
|
7086
7086
|
v.parseSwitchStatement = function(e) {
|
|
7087
|
-
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(
|
|
7088
|
-
for (var t, i = !1; this.type !==
|
|
7089
|
-
if (this.type ===
|
|
7090
|
-
var n = this.type ===
|
|
7091
|
-
t && this.finishNode(t, "SwitchCase"), e.cases.push(t = this.startNode()), t.consequent = [], this.next(), n ? t.test = this.parseExpression() : (i && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), i = !0, t.test = null), this.expect(
|
|
7087
|
+
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(l.braceL), this.labels.push(Ls), this.enterScope(0);
|
|
7088
|
+
for (var t, i = !1; this.type !== l.braceR; )
|
|
7089
|
+
if (this.type === l._case || this.type === l._default) {
|
|
7090
|
+
var n = this.type === l._case;
|
|
7091
|
+
t && this.finishNode(t, "SwitchCase"), e.cases.push(t = this.startNode()), t.consequent = [], this.next(), n ? t.test = this.parseExpression() : (i && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), i = !0, t.test = null), this.expect(l.colon);
|
|
7092
7092
|
} else
|
|
7093
7093
|
t || this.unexpected(), t.consequent.push(this.parseStatement(null));
|
|
7094
7094
|
return this.exitScope(), t && this.finishNode(t, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(e, "SwitchStatement");
|
|
@@ -7099,14 +7099,14 @@ v.parseThrowStatement = function(e) {
|
|
|
7099
7099
|
var Ps = [];
|
|
7100
7100
|
v.parseCatchClauseParam = function() {
|
|
7101
7101
|
var e = this.parseBindingAtom(), t = e.type === "Identifier";
|
|
7102
|
-
return this.enterScope(t ? sn : 0), this.checkLValPattern(e, t ? rn : be), this.expect(
|
|
7102
|
+
return this.enterScope(t ? sn : 0), this.checkLValPattern(e, t ? rn : be), this.expect(l.parenR), e;
|
|
7103
7103
|
};
|
|
7104
7104
|
v.parseTryStatement = function(e) {
|
|
7105
|
-
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type ===
|
|
7105
|
+
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === l._catch) {
|
|
7106
7106
|
var t = this.startNode();
|
|
7107
|
-
this.next(), this.eat(
|
|
7107
|
+
this.next(), this.eat(l.parenL) ? t.param = this.parseCatchClauseParam() : (this.options.ecmaVersion < 10 && this.unexpected(), t.param = null, this.enterScope(0)), t.body = this.parseBlock(!1), this.exitScope(), e.handler = this.finishNode(t, "CatchClause");
|
|
7108
7108
|
}
|
|
7109
|
-
return e.finalizer = this.eat(
|
|
7109
|
+
return e.finalizer = this.eat(l._finally) ? this.parseBlock() : null, !e.handler && !e.finalizer && this.raise(e.start, "Missing catch or finally clause"), this.finishNode(e, "TryStatement");
|
|
7110
7110
|
};
|
|
7111
7111
|
v.parseVarStatement = function(e, t, i) {
|
|
7112
7112
|
return this.next(), this.parseVar(e, !1, t, i), this.semicolon(), this.finishNode(e, "VariableDeclaration");
|
|
@@ -7125,8 +7125,8 @@ v.parseLabeledStatement = function(e, t, i, n) {
|
|
|
7125
7125
|
var o = s[u];
|
|
7126
7126
|
o.name === t && this.raise(i.start, "Label '" + t + "' is already declared");
|
|
7127
7127
|
}
|
|
7128
|
-
for (var a = this.type.isLoop ? "loop" : this.type ===
|
|
7129
|
-
var f = this.labels[
|
|
7128
|
+
for (var a = this.type.isLoop ? "loop" : this.type === l._switch ? "switch" : null, r = this.labels.length - 1; r >= 0; r--) {
|
|
7129
|
+
var f = this.labels[r];
|
|
7130
7130
|
if (f.statementStart === e.start)
|
|
7131
7131
|
f.statementStart = this.start, f.kind = a;
|
|
7132
7132
|
else
|
|
@@ -7138,26 +7138,26 @@ v.parseExpressionStatement = function(e, t) {
|
|
|
7138
7138
|
return e.expression = t, this.semicolon(), this.finishNode(e, "ExpressionStatement");
|
|
7139
7139
|
};
|
|
7140
7140
|
v.parseBlock = function(e, t, i) {
|
|
7141
|
-
for (e === void 0 && (e = !0), t === void 0 && (t = this.startNode()), t.body = [], this.expect(
|
|
7141
|
+
for (e === void 0 && (e = !0), t === void 0 && (t = this.startNode()), t.body = [], this.expect(l.braceL), e && this.enterScope(0); this.type !== l.braceR; ) {
|
|
7142
7142
|
var n = this.parseStatement(null);
|
|
7143
7143
|
t.body.push(n);
|
|
7144
7144
|
}
|
|
7145
7145
|
return i && (this.strict = !1), this.next(), e && this.exitScope(), this.finishNode(t, "BlockStatement");
|
|
7146
7146
|
};
|
|
7147
7147
|
v.parseFor = function(e, t) {
|
|
7148
|
-
return e.init = t, this.expect(
|
|
7148
|
+
return e.init = t, this.expect(l.semi), e.test = this.type === l.semi ? null : this.parseExpression(), this.expect(l.semi), e.update = this.type === l.parenR ? null : this.parseExpression(), this.expect(l.parenR), e.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e, "ForStatement");
|
|
7149
7149
|
};
|
|
7150
7150
|
v.parseForIn = function(e, t) {
|
|
7151
|
-
var i = this.type ===
|
|
7151
|
+
var i = this.type === l._in;
|
|
7152
7152
|
return this.next(), t.type === "VariableDeclaration" && t.declarations[0].init != null && (!i || this.options.ecmaVersion < 8 || this.strict || t.kind !== "var" || t.declarations[0].id.type !== "Identifier") && this.raise(
|
|
7153
7153
|
t.start,
|
|
7154
7154
|
(i ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"
|
|
7155
|
-
), e.left = t, e.right = i ? this.parseExpression() : this.parseMaybeAssign(), this.expect(
|
|
7155
|
+
), e.left = t, e.right = i ? this.parseExpression() : this.parseMaybeAssign(), this.expect(l.parenR), e.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e, i ? "ForInStatement" : "ForOfStatement");
|
|
7156
7156
|
};
|
|
7157
7157
|
v.parseVar = function(e, t, i, n) {
|
|
7158
7158
|
for (e.declarations = [], e.kind = i; ; ) {
|
|
7159
7159
|
var u = this.startNode();
|
|
7160
|
-
if (this.parseVarId(u, i), this.eat(
|
|
7160
|
+
if (this.parseVarId(u, i), this.eat(l.eq) ? u.init = this.parseMaybeAssign(t) : !n && i === "const" && !(this.type === l._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) ? this.unexpected() : !n && (i === "using" || i === "await using") && this.options.ecmaVersion >= 17 && this.type !== l._in && !this.isContextual("of") ? this.raise(this.lastTokEnd, "Missing initializer in " + i + " declaration") : !n && u.id.type !== "Identifier" && !(t && (this.type === l._in || this.isContextual("of"))) ? this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value") : u.init = null, e.declarations.push(this.finishNode(u, "VariableDeclarator")), !this.eat(l.comma))
|
|
7161
7161
|
break;
|
|
7162
7162
|
}
|
|
7163
7163
|
return e;
|
|
@@ -7167,38 +7167,38 @@ v.parseVarId = function(e, t) {
|
|
|
7167
7167
|
};
|
|
7168
7168
|
var qe = 1, Pt = 2, cn = 4;
|
|
7169
7169
|
v.parseFunction = function(e, t, i, n, u) {
|
|
7170
|
-
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !n) && (this.type ===
|
|
7170
|
+
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !n) && (this.type === l.star && t & Pt && this.unexpected(), e.generator = this.eat(l.star)), this.options.ecmaVersion >= 8 && (e.async = !!n), t & qe && (e.id = t & cn && this.type !== l.name ? null : this.parseIdent(), e.id && !(t & Pt) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? ni : be : an));
|
|
7171
7171
|
var s = this.yieldPos, o = this.awaitPos, a = this.awaitIdentPos;
|
|
7172
|
-
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(ii(e.async, e.generator)), t & qe || (e.id = this.type ===
|
|
7172
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(ii(e.async, e.generator)), t & qe || (e.id = this.type === l.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, i, !1, u), this.yieldPos = s, this.awaitPos = o, this.awaitIdentPos = a, this.finishNode(e, t & qe ? "FunctionDeclaration" : "FunctionExpression");
|
|
7173
7173
|
};
|
|
7174
7174
|
v.parseFunctionParams = function(e) {
|
|
7175
|
-
this.expect(
|
|
7175
|
+
this.expect(l.parenL), e.params = this.parseBindingList(l.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
7176
7176
|
};
|
|
7177
7177
|
v.parseClass = function(e, t) {
|
|
7178
7178
|
this.next();
|
|
7179
7179
|
var i = this.strict;
|
|
7180
7180
|
this.strict = !0, this.parseClassId(e, t), this.parseClassSuper(e);
|
|
7181
7181
|
var n = this.enterClassBody(), u = this.startNode(), s = !1;
|
|
7182
|
-
for (u.body = [], this.expect(
|
|
7182
|
+
for (u.body = [], this.expect(l.braceL); this.type !== l.braceR; ) {
|
|
7183
7183
|
var o = this.parseClassElement(e.superClass !== null);
|
|
7184
7184
|
o && (u.body.push(o), o.type === "MethodDefinition" && o.kind === "constructor" ? (s && this.raiseRecoverable(o.start, "Duplicate constructor in the same class"), s = !0) : o.key && o.key.type === "PrivateIdentifier" && Vs(n, o) && this.raiseRecoverable(o.key.start, "Identifier '#" + o.key.name + "' has already been declared"));
|
|
7185
7185
|
}
|
|
7186
7186
|
return this.strict = i, this.next(), e.body = this.finishNode(u, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
7187
7187
|
};
|
|
7188
7188
|
v.parseClassElement = function(e) {
|
|
7189
|
-
if (this.eat(
|
|
7189
|
+
if (this.eat(l.semi))
|
|
7190
7190
|
return null;
|
|
7191
7191
|
var t = this.options.ecmaVersion, i = this.startNode(), n = "", u = !1, s = !1, o = "method", a = !1;
|
|
7192
7192
|
if (this.eatContextual("static")) {
|
|
7193
|
-
if (t >= 13 && this.eat(
|
|
7193
|
+
if (t >= 13 && this.eat(l.braceL))
|
|
7194
7194
|
return this.parseClassStaticBlock(i), i;
|
|
7195
|
-
this.isClassElementNameStart() || this.type ===
|
|
7195
|
+
this.isClassElementNameStart() || this.type === l.star ? a = !0 : n = "static";
|
|
7196
7196
|
}
|
|
7197
|
-
if (i.static = a, !n && t >= 8 && this.eatContextual("async") && ((this.isClassElementNameStart() || this.type ===
|
|
7198
|
-
var
|
|
7199
|
-
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? o =
|
|
7197
|
+
if (i.static = a, !n && t >= 8 && this.eatContextual("async") && ((this.isClassElementNameStart() || this.type === l.star) && !this.canInsertSemicolon() ? s = !0 : n = "async"), !n && (t >= 9 || !s) && this.eat(l.star) && (u = !0), !n && !s && !u) {
|
|
7198
|
+
var r = this.value;
|
|
7199
|
+
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? o = r : n = r);
|
|
7200
7200
|
}
|
|
7201
|
-
if (n ? (i.computed = !1, i.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), i.key.name = n, this.finishNode(i.key, "Identifier")) : this.parseClassElementName(i), t < 13 || this.type ===
|
|
7201
|
+
if (n ? (i.computed = !1, i.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), i.key.name = n, this.finishNode(i.key, "Identifier")) : this.parseClassElementName(i), t < 13 || this.type === l.parenL || o !== "method" || u || s) {
|
|
7202
7202
|
var f = !i.static && lt(i, "constructor"), c = f && e;
|
|
7203
7203
|
f && o !== "method" && this.raise(i.key.start, "Constructor can't have get/set modifier"), i.kind = f ? "constructor" : o, this.parseClassMethod(i, u, s, c);
|
|
7204
7204
|
} else
|
|
@@ -7206,10 +7206,10 @@ v.parseClassElement = function(e) {
|
|
|
7206
7206
|
return i;
|
|
7207
7207
|
};
|
|
7208
7208
|
v.isClassElementNameStart = function() {
|
|
7209
|
-
return this.type ===
|
|
7209
|
+
return this.type === l.name || this.type === l.privateId || this.type === l.num || this.type === l.string || this.type === l.bracketL || this.type.keyword;
|
|
7210
7210
|
};
|
|
7211
7211
|
v.parseClassElementName = function(e) {
|
|
7212
|
-
this.type ===
|
|
7212
|
+
this.type === l.privateId ? (this.value === "constructor" && this.raise(this.start, "Classes can't have an element named '#constructor'"), e.computed = !1, e.key = this.parsePrivateIdent()) : this.parsePropertyName(e);
|
|
7213
7213
|
};
|
|
7214
7214
|
v.parseClassMethod = function(e, t, i, n) {
|
|
7215
7215
|
var u = e.key;
|
|
@@ -7218,22 +7218,22 @@ v.parseClassMethod = function(e, t, i, n) {
|
|
|
7218
7218
|
return e.kind === "get" && s.params.length !== 0 && this.raiseRecoverable(s.start, "getter should have no params"), e.kind === "set" && s.params.length !== 1 && this.raiseRecoverable(s.start, "setter should have exactly one param"), e.kind === "set" && s.params[0].type === "RestElement" && this.raiseRecoverable(s.params[0].start, "Setter cannot use rest params"), this.finishNode(e, "MethodDefinition");
|
|
7219
7219
|
};
|
|
7220
7220
|
v.parseClassField = function(e) {
|
|
7221
|
-
return lt(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && lt(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(
|
|
7221
|
+
return lt(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && lt(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(l.eq) ? (this.enterScope(Ke | At), e.value = this.parseMaybeAssign(), this.exitScope()) : e.value = null, this.semicolon(), this.finishNode(e, "PropertyDefinition");
|
|
7222
7222
|
};
|
|
7223
7223
|
v.parseClassStaticBlock = function(e) {
|
|
7224
7224
|
e.body = [];
|
|
7225
7225
|
var t = this.labels;
|
|
7226
|
-
for (this.labels = [], this.enterScope(Te | At); this.type !==
|
|
7226
|
+
for (this.labels = [], this.enterScope(Te | At); this.type !== l.braceR; ) {
|
|
7227
7227
|
var i = this.parseStatement(null);
|
|
7228
7228
|
e.body.push(i);
|
|
7229
7229
|
}
|
|
7230
7230
|
return this.next(), this.exitScope(), this.labels = t, this.finishNode(e, "StaticBlock");
|
|
7231
7231
|
};
|
|
7232
7232
|
v.parseClassId = function(e, t) {
|
|
7233
|
-
this.type ===
|
|
7233
|
+
this.type === l.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id, be, !1)) : (t === !0 && this.unexpected(), e.id = null);
|
|
7234
7234
|
};
|
|
7235
7235
|
v.parseClassSuper = function(e) {
|
|
7236
|
-
e.superClass = this.eat(
|
|
7236
|
+
e.superClass = this.eat(l._extends) ? this.parseExprSubscripts(null, !1) : null;
|
|
7237
7237
|
};
|
|
7238
7238
|
v.enterClassBody = function() {
|
|
7239
7239
|
var e = { declared: /* @__PURE__ */ Object.create(null), used: [] };
|
|
@@ -7256,18 +7256,18 @@ function lt(e, t) {
|
|
|
7256
7256
|
return !i && (n.type === "Identifier" && n.name === t || n.type === "Literal" && n.value === t);
|
|
7257
7257
|
}
|
|
7258
7258
|
v.parseExportAllDeclaration = function(e, t) {
|
|
7259
|
-
return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (e.exported = this.parseModuleExportName(), this.checkExport(t, e.exported, this.lastTokStart)) : e.exported = null), this.expectContextual("from"), this.type !==
|
|
7259
|
+
return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (e.exported = this.parseModuleExportName(), this.checkExport(t, e.exported, this.lastTokStart)) : e.exported = null), this.expectContextual("from"), this.type !== l.string && this.unexpected(), e.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ExportAllDeclaration");
|
|
7260
7260
|
};
|
|
7261
7261
|
v.parseExport = function(e, t) {
|
|
7262
|
-
if (this.next(), this.eat(
|
|
7262
|
+
if (this.next(), this.eat(l.star))
|
|
7263
7263
|
return this.parseExportAllDeclaration(e, t);
|
|
7264
|
-
if (this.eat(
|
|
7264
|
+
if (this.eat(l._default))
|
|
7265
7265
|
return this.checkExport(t, "default", this.lastTokStart), e.declaration = this.parseExportDefaultDeclaration(), this.finishNode(e, "ExportDefaultDeclaration");
|
|
7266
7266
|
if (this.shouldParseExportStatement())
|
|
7267
7267
|
e.declaration = this.parseExportDeclaration(e), e.declaration.type === "VariableDeclaration" ? this.checkVariableExport(t, e.declaration.declarations) : this.checkExport(t, e.declaration.id, e.declaration.id.start), e.specifiers = [], e.source = null, this.options.ecmaVersion >= 16 && (e.attributes = []);
|
|
7268
7268
|
else {
|
|
7269
7269
|
if (e.declaration = null, e.specifiers = this.parseExportSpecifiers(t), this.eatContextual("from"))
|
|
7270
|
-
this.type !==
|
|
7270
|
+
this.type !== l.string && this.unexpected(), e.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause());
|
|
7271
7271
|
else {
|
|
7272
7272
|
for (var i = 0, n = e.specifiers; i < n.length; i += 1) {
|
|
7273
7273
|
var u = n[i];
|
|
@@ -7284,10 +7284,10 @@ v.parseExportDeclaration = function(e) {
|
|
|
7284
7284
|
};
|
|
7285
7285
|
v.parseExportDefaultDeclaration = function() {
|
|
7286
7286
|
var e;
|
|
7287
|
-
if (this.type ===
|
|
7287
|
+
if (this.type === l._function || (e = this.isAsyncFunction())) {
|
|
7288
7288
|
var t = this.startNode();
|
|
7289
7289
|
return this.next(), e && this.next(), this.parseFunction(t, qe | cn, !1, e);
|
|
7290
|
-
} else if (this.type ===
|
|
7290
|
+
} else if (this.type === l._class) {
|
|
7291
7291
|
var i = this.startNode();
|
|
7292
7292
|
return this.parseClass(i, "nullableID");
|
|
7293
7293
|
} else {
|
|
@@ -7309,8 +7309,8 @@ v.checkPatternExport = function(e, t) {
|
|
|
7309
7309
|
}
|
|
7310
7310
|
else if (i === "ArrayPattern")
|
|
7311
7311
|
for (var o = 0, a = t.elements; o < a.length; o += 1) {
|
|
7312
|
-
var
|
|
7313
|
-
|
|
7312
|
+
var r = a[o];
|
|
7313
|
+
r && this.checkPatternExport(e, r);
|
|
7314
7314
|
}
|
|
7315
7315
|
else i === "Property" ? this.checkPatternExport(e, t.value) : i === "AssignmentPattern" ? this.checkPatternExport(e, t.left) : i === "RestElement" && this.checkPatternExport(e, t.argument);
|
|
7316
7316
|
};
|
|
@@ -7334,17 +7334,17 @@ v.parseExportSpecifier = function(e) {
|
|
|
7334
7334
|
};
|
|
7335
7335
|
v.parseExportSpecifiers = function(e) {
|
|
7336
7336
|
var t = [], i = !0;
|
|
7337
|
-
for (this.expect(
|
|
7337
|
+
for (this.expect(l.braceL); !this.eat(l.braceR); ) {
|
|
7338
7338
|
if (i)
|
|
7339
7339
|
i = !1;
|
|
7340
|
-
else if (this.expect(
|
|
7340
|
+
else if (this.expect(l.comma), this.afterTrailingComma(l.braceR))
|
|
7341
7341
|
break;
|
|
7342
7342
|
t.push(this.parseExportSpecifier(e));
|
|
7343
7343
|
}
|
|
7344
7344
|
return t;
|
|
7345
7345
|
};
|
|
7346
7346
|
v.parseImport = function(e) {
|
|
7347
|
-
return this.next(), this.type ===
|
|
7347
|
+
return this.next(), this.type === l.string ? (e.specifiers = Ps, e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === l.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ImportDeclaration");
|
|
7348
7348
|
};
|
|
7349
7349
|
v.parseImportSpecifier = function() {
|
|
7350
7350
|
var e = this.startNode();
|
|
@@ -7360,14 +7360,14 @@ v.parseImportNamespaceSpecifier = function() {
|
|
|
7360
7360
|
};
|
|
7361
7361
|
v.parseImportSpecifiers = function() {
|
|
7362
7362
|
var e = [], t = !0;
|
|
7363
|
-
if (this.type ===
|
|
7363
|
+
if (this.type === l.name && (e.push(this.parseImportDefaultSpecifier()), !this.eat(l.comma)))
|
|
7364
7364
|
return e;
|
|
7365
|
-
if (this.type ===
|
|
7365
|
+
if (this.type === l.star)
|
|
7366
7366
|
return e.push(this.parseImportNamespaceSpecifier()), e;
|
|
7367
|
-
for (this.expect(
|
|
7367
|
+
for (this.expect(l.braceL); !this.eat(l.braceR); ) {
|
|
7368
7368
|
if (t)
|
|
7369
7369
|
t = !1;
|
|
7370
|
-
else if (this.expect(
|
|
7370
|
+
else if (this.expect(l.comma), this.afterTrailingComma(l.braceR))
|
|
7371
7371
|
break;
|
|
7372
7372
|
e.push(this.parseImportSpecifier());
|
|
7373
7373
|
}
|
|
@@ -7375,13 +7375,13 @@ v.parseImportSpecifiers = function() {
|
|
|
7375
7375
|
};
|
|
7376
7376
|
v.parseWithClause = function() {
|
|
7377
7377
|
var e = [];
|
|
7378
|
-
if (!this.eat(
|
|
7378
|
+
if (!this.eat(l._with))
|
|
7379
7379
|
return e;
|
|
7380
|
-
this.expect(
|
|
7381
|
-
for (var t = {}, i = !0; !this.eat(
|
|
7380
|
+
this.expect(l.braceL);
|
|
7381
|
+
for (var t = {}, i = !0; !this.eat(l.braceR); ) {
|
|
7382
7382
|
if (i)
|
|
7383
7383
|
i = !1;
|
|
7384
|
-
else if (this.expect(
|
|
7384
|
+
else if (this.expect(l.comma), this.afterTrailingComma(l.braceR))
|
|
7385
7385
|
break;
|
|
7386
7386
|
var n = this.parseImportAttribute(), u = n.key.type === "Identifier" ? n.key.name : n.key.value;
|
|
7387
7387
|
Fe(t, u) && this.raiseRecoverable(n.key.start, "Duplicate attribute key '" + u + "'"), t[u] = !0, e.push(n);
|
|
@@ -7390,10 +7390,10 @@ v.parseWithClause = function() {
|
|
|
7390
7390
|
};
|
|
7391
7391
|
v.parseImportAttribute = function() {
|
|
7392
7392
|
var e = this.startNode();
|
|
7393
|
-
return e.key = this.type ===
|
|
7393
|
+
return e.key = this.type === l.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"), this.expect(l.colon), this.type !== l.string && this.unexpected(), e.value = this.parseExprAtom(), this.finishNode(e, "ImportAttribute");
|
|
7394
7394
|
};
|
|
7395
7395
|
v.parseModuleExportName = function() {
|
|
7396
|
-
if (this.options.ecmaVersion >= 13 && this.type ===
|
|
7396
|
+
if (this.options.ecmaVersion >= 13 && this.type === l.string) {
|
|
7397
7397
|
var e = this.parseLiteral(this.value);
|
|
7398
7398
|
return Bs.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e;
|
|
7399
7399
|
}
|
|
@@ -7470,29 +7470,29 @@ se.parseSpread = function(e) {
|
|
|
7470
7470
|
};
|
|
7471
7471
|
se.parseRestBinding = function() {
|
|
7472
7472
|
var e = this.startNode();
|
|
7473
|
-
return this.next(), this.options.ecmaVersion === 6 && this.type !==
|
|
7473
|
+
return this.next(), this.options.ecmaVersion === 6 && this.type !== l.name && this.unexpected(), e.argument = this.parseBindingAtom(), this.finishNode(e, "RestElement");
|
|
7474
7474
|
};
|
|
7475
7475
|
se.parseBindingAtom = function() {
|
|
7476
7476
|
if (this.options.ecmaVersion >= 6)
|
|
7477
7477
|
switch (this.type) {
|
|
7478
|
-
case
|
|
7478
|
+
case l.bracketL:
|
|
7479
7479
|
var e = this.startNode();
|
|
7480
|
-
return this.next(), e.elements = this.parseBindingList(
|
|
7481
|
-
case
|
|
7480
|
+
return this.next(), e.elements = this.parseBindingList(l.bracketR, !0, !0), this.finishNode(e, "ArrayPattern");
|
|
7481
|
+
case l.braceL:
|
|
7482
7482
|
return this.parseObj(!0);
|
|
7483
7483
|
}
|
|
7484
7484
|
return this.parseIdent();
|
|
7485
7485
|
};
|
|
7486
7486
|
se.parseBindingList = function(e, t, i, n) {
|
|
7487
7487
|
for (var u = [], s = !0; !this.eat(e); )
|
|
7488
|
-
if (s ? s = !1 : this.expect(
|
|
7488
|
+
if (s ? s = !1 : this.expect(l.comma), t && this.type === l.comma)
|
|
7489
7489
|
u.push(null);
|
|
7490
7490
|
else {
|
|
7491
7491
|
if (i && this.afterTrailingComma(e))
|
|
7492
7492
|
break;
|
|
7493
|
-
if (this.type ===
|
|
7493
|
+
if (this.type === l.ellipsis) {
|
|
7494
7494
|
var o = this.parseRestBinding();
|
|
7495
|
-
this.parseBindingListItem(o), u.push(o), this.type ===
|
|
7495
|
+
this.parseBindingListItem(o), u.push(o), this.type === l.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.expect(e);
|
|
7496
7496
|
break;
|
|
7497
7497
|
} else
|
|
7498
7498
|
u.push(this.parseAssignableListItem(n));
|
|
@@ -7507,7 +7507,7 @@ se.parseBindingListItem = function(e) {
|
|
|
7507
7507
|
return e;
|
|
7508
7508
|
};
|
|
7509
7509
|
se.parseMaybeDefault = function(e, t, i) {
|
|
7510
|
-
if (i = i || this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(
|
|
7510
|
+
if (i = i || this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(l.eq))
|
|
7511
7511
|
return i;
|
|
7512
7512
|
var n = this.startNodeAt(e, t);
|
|
7513
7513
|
return n.left = i, n.right = this.parseMaybeAssign(), this.finishNode(n, "AssignmentPattern");
|
|
@@ -7541,8 +7541,8 @@ se.checkLValPattern = function(e, t, i) {
|
|
|
7541
7541
|
break;
|
|
7542
7542
|
case "ArrayPattern":
|
|
7543
7543
|
for (var o = 0, a = e.elements; o < a.length; o += 1) {
|
|
7544
|
-
var
|
|
7545
|
-
|
|
7544
|
+
var r = a[o];
|
|
7545
|
+
r && this.checkLValInnerPattern(r, t, i);
|
|
7546
7546
|
}
|
|
7547
7547
|
break;
|
|
7548
7548
|
default:
|
|
@@ -7588,7 +7588,7 @@ Pe.curContext = function() {
|
|
|
7588
7588
|
};
|
|
7589
7589
|
Pe.braceIsBlock = function(e) {
|
|
7590
7590
|
var t = this.curContext();
|
|
7591
|
-
return t === q.f_expr || t === q.f_stat ? !0 : e ===
|
|
7591
|
+
return t === q.f_expr || t === q.f_stat ? !0 : e === l.colon && (t === q.b_stat || t === q.b_expr) ? !t.isExpr : e === l._return || e === l.name && this.exprAllowed ? Q.test(this.input.slice(this.lastTokEnd, this.start)) : e === l._else || e === l.semi || e === l.eof || e === l.parenR || e === l.arrow ? !0 : e === l.braceL ? t === q.b_stat : e === l._var || e === l._const || e === l.name ? !1 : !this.exprAllowed;
|
|
7592
7592
|
};
|
|
7593
7593
|
Pe.inGeneratorContext = function() {
|
|
7594
7594
|
for (var e = this.context.length - 1; e >= 1; e--) {
|
|
@@ -7600,12 +7600,12 @@ Pe.inGeneratorContext = function() {
|
|
|
7600
7600
|
};
|
|
7601
7601
|
Pe.updateContext = function(e) {
|
|
7602
7602
|
var t, i = this.type;
|
|
7603
|
-
i.keyword && e ===
|
|
7603
|
+
i.keyword && e === l.dot ? this.exprAllowed = !1 : (t = i.updateContext) ? t.call(this, e) : this.exprAllowed = i.beforeExpr;
|
|
7604
7604
|
};
|
|
7605
7605
|
Pe.overrideContext = function(e) {
|
|
7606
7606
|
this.curContext() !== e && (this.context[this.context.length - 1] = e);
|
|
7607
7607
|
};
|
|
7608
|
-
|
|
7608
|
+
l.parenR.updateContext = l.braceR.updateContext = function() {
|
|
7609
7609
|
if (this.context.length === 1) {
|
|
7610
7610
|
this.exprAllowed = !0;
|
|
7611
7611
|
return;
|
|
@@ -7613,37 +7613,37 @@ r.parenR.updateContext = r.braceR.updateContext = function() {
|
|
|
7613
7613
|
var e = this.context.pop();
|
|
7614
7614
|
e === q.b_stat && this.curContext().token === "function" && (e = this.context.pop()), this.exprAllowed = !e.isExpr;
|
|
7615
7615
|
};
|
|
7616
|
-
|
|
7616
|
+
l.braceL.updateContext = function(e) {
|
|
7617
7617
|
this.context.push(this.braceIsBlock(e) ? q.b_stat : q.b_expr), this.exprAllowed = !0;
|
|
7618
7618
|
};
|
|
7619
|
-
|
|
7619
|
+
l.dollarBraceL.updateContext = function() {
|
|
7620
7620
|
this.context.push(q.b_tmpl), this.exprAllowed = !0;
|
|
7621
7621
|
};
|
|
7622
|
-
|
|
7623
|
-
var t = e ===
|
|
7622
|
+
l.parenL.updateContext = function(e) {
|
|
7623
|
+
var t = e === l._if || e === l._for || e === l._with || e === l._while;
|
|
7624
7624
|
this.context.push(t ? q.p_stat : q.p_expr), this.exprAllowed = !0;
|
|
7625
7625
|
};
|
|
7626
|
-
|
|
7626
|
+
l.incDec.updateContext = function() {
|
|
7627
7627
|
};
|
|
7628
|
-
|
|
7629
|
-
e.beforeExpr && e !==
|
|
7628
|
+
l._function.updateContext = l._class.updateContext = function(e) {
|
|
7629
|
+
e.beforeExpr && e !== l._else && !(e === l.semi && this.curContext() !== q.p_stat) && !(e === l._return && Q.test(this.input.slice(this.lastTokEnd, this.start))) && !((e === l.colon || e === l.braceL) && this.curContext() === q.b_stat) ? this.context.push(q.f_expr) : this.context.push(q.f_stat), this.exprAllowed = !1;
|
|
7630
7630
|
};
|
|
7631
|
-
|
|
7631
|
+
l.colon.updateContext = function() {
|
|
7632
7632
|
this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
|
|
7633
7633
|
};
|
|
7634
|
-
|
|
7634
|
+
l.backQuote.updateContext = function() {
|
|
7635
7635
|
this.curContext() === q.q_tmpl ? this.context.pop() : this.context.push(q.q_tmpl), this.exprAllowed = !1;
|
|
7636
7636
|
};
|
|
7637
|
-
|
|
7638
|
-
if (e ===
|
|
7637
|
+
l.star.updateContext = function(e) {
|
|
7638
|
+
if (e === l._function) {
|
|
7639
7639
|
var t = this.context.length - 1;
|
|
7640
7640
|
this.context[t] === q.f_expr ? this.context[t] = q.f_expr_gen : this.context[t] = q.f_gen;
|
|
7641
7641
|
}
|
|
7642
7642
|
this.exprAllowed = !0;
|
|
7643
7643
|
};
|
|
7644
|
-
|
|
7644
|
+
l.name.updateContext = function(e) {
|
|
7645
7645
|
var t = !1;
|
|
7646
|
-
this.options.ecmaVersion >= 6 && e !==
|
|
7646
|
+
this.options.ecmaVersion >= 6 && e !== l.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (t = !0), this.exprAllowed = t;
|
|
7647
7647
|
};
|
|
7648
7648
|
var x = j.prototype;
|
|
7649
7649
|
x.checkPropClash = function(e, t, i) {
|
|
@@ -7680,9 +7680,9 @@ x.checkPropClash = function(e, t, i) {
|
|
|
7680
7680
|
};
|
|
7681
7681
|
x.parseExpression = function(e, t) {
|
|
7682
7682
|
var i = this.start, n = this.startLoc, u = this.parseMaybeAssign(e, t);
|
|
7683
|
-
if (this.type ===
|
|
7683
|
+
if (this.type === l.comma) {
|
|
7684
7684
|
var s = this.startNodeAt(i, n);
|
|
7685
|
-
for (s.expressions = [u]; this.eat(
|
|
7685
|
+
for (s.expressions = [u]; this.eat(l.comma); )
|
|
7686
7686
|
s.expressions.push(this.parseMaybeAssign(e, t));
|
|
7687
7687
|
return this.finishNode(s, "SequenceExpression");
|
|
7688
7688
|
}
|
|
@@ -7696,12 +7696,12 @@ x.parseMaybeAssign = function(e, t, i) {
|
|
|
7696
7696
|
}
|
|
7697
7697
|
var n = !1, u = -1, s = -1, o = -1;
|
|
7698
7698
|
t ? (u = t.parenthesizedAssign, s = t.trailingComma, o = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new wt(), n = !0);
|
|
7699
|
-
var a = this.start,
|
|
7700
|
-
(this.type ===
|
|
7699
|
+
var a = this.start, r = this.startLoc;
|
|
7700
|
+
(this.type === l.parenL || this.type === l.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
7701
7701
|
var f = this.parseMaybeConditional(e, t);
|
|
7702
|
-
if (i && (f = i.call(this, f, a,
|
|
7703
|
-
var c = this.startNodeAt(a,
|
|
7704
|
-
return c.operator = this.value, this.type ===
|
|
7702
|
+
if (i && (f = i.call(this, f, a, r)), this.type.isAssign) {
|
|
7703
|
+
var c = this.startNodeAt(a, r);
|
|
7704
|
+
return c.operator = this.value, this.type === l.eq && (f = this.toAssignable(f, !1, t)), n || (t.parenthesizedAssign = t.trailingComma = t.doubleProto = -1), t.shorthandAssign >= f.start && (t.shorthandAssign = -1), this.type === l.eq ? this.checkLValPattern(f) : this.checkLValSimple(f), c.left = f, this.next(), c.right = this.parseMaybeAssign(e), o > -1 && (t.doubleProto = o), this.finishNode(c, "AssignmentExpression");
|
|
7705
7705
|
} else
|
|
7706
7706
|
n && this.checkExpressionErrors(t, !0);
|
|
7707
7707
|
return u > -1 && (t.parenthesizedAssign = u), s > -1 && (t.trailingComma = s), f;
|
|
@@ -7710,9 +7710,9 @@ x.parseMaybeConditional = function(e, t) {
|
|
|
7710
7710
|
var i = this.start, n = this.startLoc, u = this.parseExprOps(e, t);
|
|
7711
7711
|
if (this.checkExpressionErrors(t))
|
|
7712
7712
|
return u;
|
|
7713
|
-
if (this.eat(
|
|
7713
|
+
if (this.eat(l.question)) {
|
|
7714
7714
|
var s = this.startNodeAt(i, n);
|
|
7715
|
-
return s.test = u, s.consequent = this.parseMaybeAssign(), this.expect(
|
|
7715
|
+
return s.test = u, s.consequent = this.parseMaybeAssign(), this.expect(l.colon), s.alternate = this.parseMaybeAssign(e), this.finishNode(s, "ConditionalExpression");
|
|
7716
7716
|
}
|
|
7717
7717
|
return u;
|
|
7718
7718
|
};
|
|
@@ -7722,13 +7722,13 @@ x.parseExprOps = function(e, t) {
|
|
|
7722
7722
|
};
|
|
7723
7723
|
x.parseExprOp = function(e, t, i, n, u) {
|
|
7724
7724
|
var s = this.type.binop;
|
|
7725
|
-
if (s != null && (!u || this.type !==
|
|
7726
|
-
var o = this.type ===
|
|
7727
|
-
a && (s =
|
|
7728
|
-
var
|
|
7725
|
+
if (s != null && (!u || this.type !== l._in) && s > n) {
|
|
7726
|
+
var o = this.type === l.logicalOR || this.type === l.logicalAND, a = this.type === l.coalesce;
|
|
7727
|
+
a && (s = l.logicalAND.binop);
|
|
7728
|
+
var r = this.value;
|
|
7729
7729
|
this.next();
|
|
7730
|
-
var f = this.start, c = this.startLoc, h = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, u), f, c, s, u), d = this.buildBinary(t, i, e, h,
|
|
7731
|
-
return (o && this.type ===
|
|
7730
|
+
var f = this.start, c = this.startLoc, h = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, u), f, c, s, u), d = this.buildBinary(t, i, e, h, r, o || a);
|
|
7731
|
+
return (o && this.type === l.coalesce || a && (this.type === l.logicalOR || this.type === l.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(d, t, i, n, u);
|
|
7732
7732
|
}
|
|
7733
7733
|
return e;
|
|
7734
7734
|
};
|
|
@@ -7742,10 +7742,10 @@ x.parseMaybeUnary = function(e, t, i, n) {
|
|
|
7742
7742
|
if (this.isContextual("await") && this.canAwait)
|
|
7743
7743
|
o = this.parseAwait(n), t = !0;
|
|
7744
7744
|
else if (this.type.prefix) {
|
|
7745
|
-
var a = this.startNode(),
|
|
7746
|
-
a.operator = this.value, a.prefix = !0, this.next(), a.argument = this.parseMaybeUnary(null, !0,
|
|
7747
|
-
} else if (!t && this.type ===
|
|
7748
|
-
(n || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), o = this.parsePrivateIdent(), this.type !==
|
|
7745
|
+
var a = this.startNode(), r = this.type === l.incDec;
|
|
7746
|
+
a.operator = this.value, a.prefix = !0, this.next(), a.argument = this.parseMaybeUnary(null, !0, r, n), this.checkExpressionErrors(e, !0), r ? this.checkLValSimple(a.argument) : this.strict && a.operator === "delete" && fn(a.argument) ? this.raiseRecoverable(a.start, "Deleting local variable in strict mode") : a.operator === "delete" && Vt(a.argument) ? this.raiseRecoverable(a.start, "Private fields can not be deleted") : t = !0, o = this.finishNode(a, r ? "UpdateExpression" : "UnaryExpression");
|
|
7747
|
+
} else if (!t && this.type === l.privateId)
|
|
7748
|
+
(n || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), o = this.parsePrivateIdent(), this.type !== l._in && this.unexpected();
|
|
7749
7749
|
else {
|
|
7750
7750
|
if (o = this.parseExprSubscripts(e, n), this.checkExpressionErrors(e))
|
|
7751
7751
|
return o;
|
|
@@ -7754,7 +7754,7 @@ x.parseMaybeUnary = function(e, t, i, n) {
|
|
|
7754
7754
|
f.operator = this.value, f.prefix = !1, f.argument = o, this.checkLValSimple(o), this.next(), o = this.finishNode(f, "UpdateExpression");
|
|
7755
7755
|
}
|
|
7756
7756
|
}
|
|
7757
|
-
if (!i && this.eat(
|
|
7757
|
+
if (!i && this.eat(l.starstar))
|
|
7758
7758
|
if (t)
|
|
7759
7759
|
this.unexpected(this.lastTokStart);
|
|
7760
7760
|
else
|
|
@@ -7780,8 +7780,8 @@ x.parseSubscripts = function(e, t, i, n, u) {
|
|
|
7780
7780
|
var a = this.parseSubscript(e, t, i, n, s, o, u);
|
|
7781
7781
|
if (a.optional && (o = !0), a === e || a.type === "ArrowFunctionExpression") {
|
|
7782
7782
|
if (o) {
|
|
7783
|
-
var
|
|
7784
|
-
|
|
7783
|
+
var r = this.startNodeAt(t, i);
|
|
7784
|
+
r.expression = a, a = this.finishNode(r, "ChainExpression");
|
|
7785
7785
|
}
|
|
7786
7786
|
return a;
|
|
7787
7787
|
}
|
|
@@ -7789,79 +7789,79 @@ x.parseSubscripts = function(e, t, i, n, u) {
|
|
|
7789
7789
|
}
|
|
7790
7790
|
};
|
|
7791
7791
|
x.shouldParseAsyncArrow = function() {
|
|
7792
|
-
return !this.canInsertSemicolon() && this.eat(
|
|
7792
|
+
return !this.canInsertSemicolon() && this.eat(l.arrow);
|
|
7793
7793
|
};
|
|
7794
7794
|
x.parseSubscriptAsyncArrow = function(e, t, i, n) {
|
|
7795
7795
|
return this.parseArrowExpression(this.startNodeAt(e, t), i, !0, n);
|
|
7796
7796
|
};
|
|
7797
7797
|
x.parseSubscript = function(e, t, i, n, u, s, o) {
|
|
7798
|
-
var a = this.options.ecmaVersion >= 11,
|
|
7799
|
-
n &&
|
|
7800
|
-
var f = this.eat(
|
|
7801
|
-
if (f ||
|
|
7798
|
+
var a = this.options.ecmaVersion >= 11, r = a && this.eat(l.questionDot);
|
|
7799
|
+
n && r && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
7800
|
+
var f = this.eat(l.bracketL);
|
|
7801
|
+
if (f || r && this.type !== l.parenL && this.type !== l.backQuote || this.eat(l.dot)) {
|
|
7802
7802
|
var c = this.startNodeAt(t, i);
|
|
7803
|
-
c.object = e, f ? (c.property = this.parseExpression(), this.expect(
|
|
7804
|
-
} else if (!n && this.eat(
|
|
7803
|
+
c.object = e, f ? (c.property = this.parseExpression(), this.expect(l.bracketR)) : this.type === l.privateId && e.type !== "Super" ? c.property = this.parsePrivateIdent() : c.property = this.parseIdent(this.options.allowReserved !== "never"), c.computed = !!f, a && (c.optional = r), e = this.finishNode(c, "MemberExpression");
|
|
7804
|
+
} else if (!n && this.eat(l.parenL)) {
|
|
7805
7805
|
var h = new wt(), d = this.yieldPos, y = this.awaitPos, C = this.awaitIdentPos;
|
|
7806
7806
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
7807
|
-
var D = this.parseExprList(
|
|
7808
|
-
if (u && !
|
|
7807
|
+
var D = this.parseExprList(l.parenR, this.options.ecmaVersion >= 8, !1, h);
|
|
7808
|
+
if (u && !r && this.shouldParseAsyncArrow())
|
|
7809
7809
|
return this.checkPatternErrors(h, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = d, this.awaitPos = y, this.awaitIdentPos = C, this.parseSubscriptAsyncArrow(t, i, D, o);
|
|
7810
7810
|
this.checkExpressionErrors(h, !0), this.yieldPos = d || this.yieldPos, this.awaitPos = y || this.awaitPos, this.awaitIdentPos = C || this.awaitIdentPos;
|
|
7811
7811
|
var w = this.startNodeAt(t, i);
|
|
7812
|
-
w.callee = e, w.arguments = D, a && (w.optional =
|
|
7813
|
-
} else if (this.type ===
|
|
7814
|
-
(
|
|
7812
|
+
w.callee = e, w.arguments = D, a && (w.optional = r), e = this.finishNode(w, "CallExpression");
|
|
7813
|
+
} else if (this.type === l.backQuote) {
|
|
7814
|
+
(r || s) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
7815
7815
|
var E = this.startNodeAt(t, i);
|
|
7816
7816
|
E.tag = e, E.quasi = this.parseTemplate({ isTagged: !0 }), e = this.finishNode(E, "TaggedTemplateExpression");
|
|
7817
7817
|
}
|
|
7818
7818
|
return e;
|
|
7819
7819
|
};
|
|
7820
7820
|
x.parseExprAtom = function(e, t, i) {
|
|
7821
|
-
this.type ===
|
|
7821
|
+
this.type === l.slash && this.readRegexp();
|
|
7822
7822
|
var n, u = this.potentialArrowAt === this.start;
|
|
7823
7823
|
switch (this.type) {
|
|
7824
|
-
case
|
|
7825
|
-
return this.allowSuper || this.raise(this.start, "'super' keyword outside a method"), n = this.startNode(), this.next(), this.type ===
|
|
7826
|
-
case
|
|
7824
|
+
case l._super:
|
|
7825
|
+
return this.allowSuper || this.raise(this.start, "'super' keyword outside a method"), n = this.startNode(), this.next(), this.type === l.parenL && !this.allowDirectSuper && this.raise(n.start, "super() call outside constructor of a subclass"), this.type !== l.dot && this.type !== l.bracketL && this.type !== l.parenL && this.unexpected(), this.finishNode(n, "Super");
|
|
7826
|
+
case l._this:
|
|
7827
7827
|
return n = this.startNode(), this.next(), this.finishNode(n, "ThisExpression");
|
|
7828
|
-
case
|
|
7829
|
-
var s = this.start, o = this.startLoc, a = this.containsEsc,
|
|
7830
|
-
if (this.options.ecmaVersion >= 8 && !a &&
|
|
7828
|
+
case l.name:
|
|
7829
|
+
var s = this.start, o = this.startLoc, a = this.containsEsc, r = this.parseIdent(!1);
|
|
7830
|
+
if (this.options.ecmaVersion >= 8 && !a && r.name === "async" && !this.canInsertSemicolon() && this.eat(l._function))
|
|
7831
7831
|
return this.overrideContext(q.f_expr), this.parseFunction(this.startNodeAt(s, o), 0, !1, !0, t);
|
|
7832
7832
|
if (u && !this.canInsertSemicolon()) {
|
|
7833
|
-
if (this.eat(
|
|
7834
|
-
return this.parseArrowExpression(this.startNodeAt(s, o), [
|
|
7835
|
-
if (this.options.ecmaVersion >= 8 &&
|
|
7836
|
-
return
|
|
7833
|
+
if (this.eat(l.arrow))
|
|
7834
|
+
return this.parseArrowExpression(this.startNodeAt(s, o), [r], !1, t);
|
|
7835
|
+
if (this.options.ecmaVersion >= 8 && r.name === "async" && this.type === l.name && !a && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc))
|
|
7836
|
+
return r = this.parseIdent(!1), (this.canInsertSemicolon() || !this.eat(l.arrow)) && this.unexpected(), this.parseArrowExpression(this.startNodeAt(s, o), [r], !0, t);
|
|
7837
7837
|
}
|
|
7838
|
-
return
|
|
7839
|
-
case
|
|
7838
|
+
return r;
|
|
7839
|
+
case l.regexp:
|
|
7840
7840
|
var f = this.value;
|
|
7841
7841
|
return n = this.parseLiteral(f.value), n.regex = { pattern: f.pattern, flags: f.flags }, n;
|
|
7842
|
-
case
|
|
7843
|
-
case
|
|
7842
|
+
case l.num:
|
|
7843
|
+
case l.string:
|
|
7844
7844
|
return this.parseLiteral(this.value);
|
|
7845
|
-
case
|
|
7846
|
-
case
|
|
7847
|
-
case
|
|
7848
|
-
return n = this.startNode(), n.value = this.type ===
|
|
7849
|
-
case
|
|
7845
|
+
case l._null:
|
|
7846
|
+
case l._true:
|
|
7847
|
+
case l._false:
|
|
7848
|
+
return n = this.startNode(), n.value = this.type === l._null ? null : this.type === l._true, n.raw = this.type.keyword, this.next(), this.finishNode(n, "Literal");
|
|
7849
|
+
case l.parenL:
|
|
7850
7850
|
var c = this.start, h = this.parseParenAndDistinguishExpression(u, t);
|
|
7851
7851
|
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(h) && (e.parenthesizedAssign = c), e.parenthesizedBind < 0 && (e.parenthesizedBind = c)), h;
|
|
7852
|
-
case
|
|
7853
|
-
return n = this.startNode(), this.next(), n.elements = this.parseExprList(
|
|
7854
|
-
case
|
|
7852
|
+
case l.bracketL:
|
|
7853
|
+
return n = this.startNode(), this.next(), n.elements = this.parseExprList(l.bracketR, !0, !0, e), this.finishNode(n, "ArrayExpression");
|
|
7854
|
+
case l.braceL:
|
|
7855
7855
|
return this.overrideContext(q.b_expr), this.parseObj(!1, e);
|
|
7856
|
-
case
|
|
7856
|
+
case l._function:
|
|
7857
7857
|
return n = this.startNode(), this.next(), this.parseFunction(n, 0);
|
|
7858
|
-
case
|
|
7858
|
+
case l._class:
|
|
7859
7859
|
return this.parseClass(this.startNode(), !1);
|
|
7860
|
-
case
|
|
7860
|
+
case l._new:
|
|
7861
7861
|
return this.parseNew();
|
|
7862
|
-
case
|
|
7862
|
+
case l.backQuote:
|
|
7863
7863
|
return this.parseTemplate();
|
|
7864
|
-
case
|
|
7864
|
+
case l._import:
|
|
7865
7865
|
return this.options.ecmaVersion >= 11 ? this.parseExprImport(i) : this.unexpected();
|
|
7866
7866
|
default:
|
|
7867
7867
|
return this.parseExprAtomDefault();
|
|
@@ -7872,9 +7872,9 @@ x.parseExprAtomDefault = function() {
|
|
|
7872
7872
|
};
|
|
7873
7873
|
x.parseExprImport = function(e) {
|
|
7874
7874
|
var t = this.startNode();
|
|
7875
|
-
if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type ===
|
|
7875
|
+
if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type === l.parenL && !e)
|
|
7876
7876
|
return this.parseDynamicImport(t);
|
|
7877
|
-
if (this.type ===
|
|
7877
|
+
if (this.type === l.dot) {
|
|
7878
7878
|
var i = this.startNodeAt(t.start, t.loc && t.loc.start);
|
|
7879
7879
|
return i.name = "import", t.meta = this.finishNode(i, "Identifier"), this.parseImportMeta(t);
|
|
7880
7880
|
} else
|
|
@@ -7882,10 +7882,10 @@ x.parseExprImport = function(e) {
|
|
|
7882
7882
|
};
|
|
7883
7883
|
x.parseDynamicImport = function(e) {
|
|
7884
7884
|
if (this.next(), e.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16)
|
|
7885
|
-
this.eat(
|
|
7886
|
-
else if (!this.eat(
|
|
7885
|
+
this.eat(l.parenR) ? e.options = null : (this.expect(l.comma), this.afterTrailingComma(l.parenR) ? e.options = null : (e.options = this.parseMaybeAssign(), this.eat(l.parenR) || (this.expect(l.comma), this.afterTrailingComma(l.parenR) || this.unexpected())));
|
|
7886
|
+
else if (!this.eat(l.parenR)) {
|
|
7887
7887
|
var t = this.start;
|
|
7888
|
-
this.eat(
|
|
7888
|
+
this.eat(l.comma) && this.eat(l.parenR) ? this.raiseRecoverable(t, "Trailing comma is not allowed in import()") : this.unexpected(t);
|
|
7889
7889
|
}
|
|
7890
7890
|
return this.finishNode(e, "ImportExpression");
|
|
7891
7891
|
};
|
|
@@ -7899,9 +7899,9 @@ x.parseLiteral = function(e) {
|
|
|
7899
7899
|
return t.value = e, t.raw = this.input.slice(this.start, this.end), t.raw.charCodeAt(t.raw.length - 1) === 110 && (t.bigint = t.value != null ? t.value.toString() : t.raw.slice(0, -1).replace(/_/g, "")), this.next(), this.finishNode(t, "Literal");
|
|
7900
7900
|
};
|
|
7901
7901
|
x.parseParenExpression = function() {
|
|
7902
|
-
this.expect(
|
|
7902
|
+
this.expect(l.parenL);
|
|
7903
7903
|
var e = this.parseExpression();
|
|
7904
|
-
return this.expect(
|
|
7904
|
+
return this.expect(l.parenR), e;
|
|
7905
7905
|
};
|
|
7906
7906
|
x.shouldParseArrow = function(e) {
|
|
7907
7907
|
return !this.canInsertSemicolon();
|
|
@@ -7910,23 +7910,23 @@ x.parseParenAndDistinguishExpression = function(e, t) {
|
|
|
7910
7910
|
var i = this.start, n = this.startLoc, u, s = this.options.ecmaVersion >= 8;
|
|
7911
7911
|
if (this.options.ecmaVersion >= 6) {
|
|
7912
7912
|
this.next();
|
|
7913
|
-
var o = this.start, a = this.startLoc,
|
|
7914
|
-
for (this.yieldPos = 0, this.awaitPos = 0; this.type !==
|
|
7915
|
-
if (f ? f = !1 : this.expect(
|
|
7913
|
+
var o = this.start, a = this.startLoc, r = [], f = !0, c = !1, h = new wt(), d = this.yieldPos, y = this.awaitPos, C;
|
|
7914
|
+
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== l.parenR; )
|
|
7915
|
+
if (f ? f = !1 : this.expect(l.comma), s && this.afterTrailingComma(l.parenR, !0)) {
|
|
7916
7916
|
c = !0;
|
|
7917
7917
|
break;
|
|
7918
|
-
} else if (this.type ===
|
|
7919
|
-
C = this.start,
|
|
7918
|
+
} else if (this.type === l.ellipsis) {
|
|
7919
|
+
C = this.start, r.push(this.parseParenItem(this.parseRestBinding())), this.type === l.comma && this.raiseRecoverable(
|
|
7920
7920
|
this.start,
|
|
7921
7921
|
"Comma is not permitted after the rest element"
|
|
7922
7922
|
);
|
|
7923
7923
|
break;
|
|
7924
7924
|
} else
|
|
7925
|
-
|
|
7925
|
+
r.push(this.parseMaybeAssign(!1, h, this.parseParenItem));
|
|
7926
7926
|
var D = this.lastTokEnd, w = this.lastTokEndLoc;
|
|
7927
|
-
if (this.expect(
|
|
7928
|
-
return this.checkPatternErrors(h, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = d, this.awaitPos = y, this.parseParenArrowList(i, n,
|
|
7929
|
-
(!
|
|
7927
|
+
if (this.expect(l.parenR), e && this.shouldParseArrow(r) && this.eat(l.arrow))
|
|
7928
|
+
return this.checkPatternErrors(h, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = d, this.awaitPos = y, this.parseParenArrowList(i, n, r, t);
|
|
7929
|
+
(!r.length || c) && this.unexpected(this.lastTokStart), C && this.unexpected(C), this.checkExpressionErrors(h, !0), this.yieldPos = d || this.yieldPos, this.awaitPos = y || this.awaitPos, r.length > 1 ? (u = this.startNodeAt(o, a), u.expressions = r, this.finishNodeAt(u, "SequenceExpression", D, w)) : u = r[0];
|
|
7930
7930
|
} else
|
|
7931
7931
|
u = this.parseParenExpression();
|
|
7932
7932
|
if (this.options.preserveParens) {
|
|
@@ -7945,18 +7945,18 @@ var Rs = [];
|
|
|
7945
7945
|
x.parseNew = function() {
|
|
7946
7946
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
7947
7947
|
var e = this.startNode();
|
|
7948
|
-
if (this.next(), this.options.ecmaVersion >= 6 && this.type ===
|
|
7948
|
+
if (this.next(), this.options.ecmaVersion >= 6 && this.type === l.dot) {
|
|
7949
7949
|
var t = this.startNodeAt(e.start, e.loc && e.loc.start);
|
|
7950
7950
|
t.name = "new", e.meta = this.finishNode(t, "Identifier"), this.next();
|
|
7951
7951
|
var i = this.containsEsc;
|
|
7952
7952
|
return e.property = this.parseIdent(!0), e.property.name !== "target" && this.raiseRecoverable(e.property.start, "The only valid meta property for new is 'new.target'"), i && this.raiseRecoverable(e.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(e.start, "'new.target' can only be used in functions and class static block"), this.finishNode(e, "MetaProperty");
|
|
7953
7953
|
}
|
|
7954
7954
|
var n = this.start, u = this.startLoc;
|
|
7955
|
-
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), n, u, !0, !1), this.eat(
|
|
7955
|
+
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), n, u, !0, !1), this.eat(l.parenL) ? e.arguments = this.parseExprList(l.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments = Rs, this.finishNode(e, "NewExpression");
|
|
7956
7956
|
};
|
|
7957
7957
|
x.parseTemplateElement = function(e) {
|
|
7958
7958
|
var t = e.isTagged, i = this.startNode();
|
|
7959
|
-
return this.type ===
|
|
7959
|
+
return this.type === l.invalidTemplate ? (t || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), i.value = {
|
|
7960
7960
|
raw: this.value.replace(/\r\n?/g, `
|
|
7961
7961
|
`),
|
|
7962
7962
|
cooked: null
|
|
@@ -7964,7 +7964,7 @@ x.parseTemplateElement = function(e) {
|
|
|
7964
7964
|
raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, `
|
|
7965
7965
|
`),
|
|
7966
7966
|
cooked: this.value
|
|
7967
|
-
}, this.next(), i.tail = this.type ===
|
|
7967
|
+
}, this.next(), i.tail = this.type === l.backQuote, this.finishNode(i, "TemplateElement");
|
|
7968
7968
|
};
|
|
7969
7969
|
x.parseTemplate = function(e) {
|
|
7970
7970
|
e === void 0 && (e = {});
|
|
@@ -7974,18 +7974,18 @@ x.parseTemplate = function(e) {
|
|
|
7974
7974
|
this.next(), i.expressions = [];
|
|
7975
7975
|
var n = this.parseTemplateElement({ isTagged: t });
|
|
7976
7976
|
for (i.quasis = [n]; !n.tail; )
|
|
7977
|
-
this.type ===
|
|
7977
|
+
this.type === l.eof && this.raise(this.pos, "Unterminated template literal"), this.expect(l.dollarBraceL), i.expressions.push(this.parseExpression()), this.expect(l.braceR), i.quasis.push(n = this.parseTemplateElement({ isTagged: t }));
|
|
7978
7978
|
return this.next(), this.finishNode(i, "TemplateLiteral");
|
|
7979
7979
|
};
|
|
7980
7980
|
x.isAsyncProp = function(e) {
|
|
7981
|
-
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type ===
|
|
7981
|
+
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === l.name || this.type === l.num || this.type === l.string || this.type === l.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === l.star) && !Q.test(this.input.slice(this.lastTokEnd, this.start));
|
|
7982
7982
|
};
|
|
7983
7983
|
x.parseObj = function(e, t) {
|
|
7984
7984
|
var i = this.startNode(), n = !0, u = {};
|
|
7985
|
-
for (i.properties = [], this.next(); !this.eat(
|
|
7985
|
+
for (i.properties = [], this.next(); !this.eat(l.braceR); ) {
|
|
7986
7986
|
if (n)
|
|
7987
7987
|
n = !1;
|
|
7988
|
-
else if (this.expect(
|
|
7988
|
+
else if (this.expect(l.comma), this.options.ecmaVersion >= 5 && this.afterTrailingComma(l.braceR))
|
|
7989
7989
|
break;
|
|
7990
7990
|
var s = this.parseProperty(e, t);
|
|
7991
7991
|
e || this.checkPropClash(s, u, t), i.properties.push(s);
|
|
@@ -7994,11 +7994,11 @@ x.parseObj = function(e, t) {
|
|
|
7994
7994
|
};
|
|
7995
7995
|
x.parseProperty = function(e, t) {
|
|
7996
7996
|
var i = this.startNode(), n, u, s, o;
|
|
7997
|
-
if (this.options.ecmaVersion >= 9 && this.eat(
|
|
7998
|
-
return e ? (i.argument = this.parseIdent(!1), this.type ===
|
|
7999
|
-
this.options.ecmaVersion >= 6 && (i.method = !1, i.shorthand = !1, (e || t) && (s = this.start, o = this.startLoc), e || (n = this.eat(
|
|
7997
|
+
if (this.options.ecmaVersion >= 9 && this.eat(l.ellipsis))
|
|
7998
|
+
return e ? (i.argument = this.parseIdent(!1), this.type === l.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.finishNode(i, "RestElement")) : (i.argument = this.parseMaybeAssign(!1, t), this.type === l.comma && t && t.trailingComma < 0 && (t.trailingComma = this.start), this.finishNode(i, "SpreadElement"));
|
|
7999
|
+
this.options.ecmaVersion >= 6 && (i.method = !1, i.shorthand = !1, (e || t) && (s = this.start, o = this.startLoc), e || (n = this.eat(l.star)));
|
|
8000
8000
|
var a = this.containsEsc;
|
|
8001
|
-
return this.parsePropertyName(i), !e && !a && this.options.ecmaVersion >= 8 && !n && this.isAsyncProp(i) ? (u = !0, n = this.options.ecmaVersion >= 9 && this.eat(
|
|
8001
|
+
return this.parsePropertyName(i), !e && !a && this.options.ecmaVersion >= 8 && !n && this.isAsyncProp(i) ? (u = !0, n = this.options.ecmaVersion >= 9 && this.eat(l.star), this.parsePropertyName(i)) : u = !1, this.parsePropertyValue(i, e, n, u, s, o, t, a), this.finishNode(i, "Property");
|
|
8002
8002
|
};
|
|
8003
8003
|
x.parseGetterSetter = function(e) {
|
|
8004
8004
|
var t = e.key.name;
|
|
@@ -8011,36 +8011,36 @@ x.parseGetterSetter = function(e) {
|
|
|
8011
8011
|
e.kind === "set" && e.value.params[0].type === "RestElement" && this.raiseRecoverable(e.value.params[0].start, "Setter cannot use rest params");
|
|
8012
8012
|
};
|
|
8013
8013
|
x.parsePropertyValue = function(e, t, i, n, u, s, o, a) {
|
|
8014
|
-
(i || n) && this.type ===
|
|
8014
|
+
(i || n) && this.type === l.colon && this.unexpected(), this.eat(l.colon) ? (e.value = t ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1, o), e.kind = "init") : this.options.ecmaVersion >= 6 && this.type === l.parenL ? (t && this.unexpected(), e.method = !0, e.value = this.parseMethod(i, n), e.kind = "init") : !t && !a && this.options.ecmaVersion >= 5 && !e.computed && e.key.type === "Identifier" && (e.key.name === "get" || e.key.name === "set") && this.type !== l.comma && this.type !== l.braceR && this.type !== l.eq ? ((i || n) && this.unexpected(), this.parseGetterSetter(e)) : this.options.ecmaVersion >= 6 && !e.computed && e.key.type === "Identifier" ? ((i || n) && this.unexpected(), this.checkUnreserved(e.key), e.key.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = u), t ? e.value = this.parseMaybeDefault(u, s, this.copyNode(e.key)) : this.type === l.eq && o ? (o.shorthandAssign < 0 && (o.shorthandAssign = this.start), e.value = this.parseMaybeDefault(u, s, this.copyNode(e.key))) : e.value = this.copyNode(e.key), e.kind = "init", e.shorthand = !0) : this.unexpected();
|
|
8015
8015
|
};
|
|
8016
8016
|
x.parsePropertyName = function(e) {
|
|
8017
8017
|
if (this.options.ecmaVersion >= 6) {
|
|
8018
|
-
if (this.eat(
|
|
8019
|
-
return e.computed = !0, e.key = this.parseMaybeAssign(), this.expect(
|
|
8018
|
+
if (this.eat(l.bracketL))
|
|
8019
|
+
return e.computed = !0, e.key = this.parseMaybeAssign(), this.expect(l.bracketR), e.key;
|
|
8020
8020
|
e.computed = !1;
|
|
8021
8021
|
}
|
|
8022
|
-
return e.key = this.type ===
|
|
8022
|
+
return e.key = this.type === l.num || this.type === l.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
|
|
8023
8023
|
};
|
|
8024
8024
|
x.initFunction = function(e) {
|
|
8025
8025
|
e.id = null, this.options.ecmaVersion >= 6 && (e.generator = e.expression = !1), this.options.ecmaVersion >= 8 && (e.async = !1);
|
|
8026
8026
|
};
|
|
8027
8027
|
x.parseMethod = function(e, t, i) {
|
|
8028
8028
|
var n = this.startNode(), u = this.yieldPos, s = this.awaitPos, o = this.awaitIdentPos;
|
|
8029
|
-
return this.initFunction(n), this.options.ecmaVersion >= 6 && (n.generator = e), this.options.ecmaVersion >= 8 && (n.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(ii(t, n.generator) | At | (i ? on : 0)), this.expect(
|
|
8029
|
+
return this.initFunction(n), this.options.ecmaVersion >= 6 && (n.generator = e), this.options.ecmaVersion >= 8 && (n.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(ii(t, n.generator) | At | (i ? on : 0)), this.expect(l.parenL), n.params = this.parseBindingList(l.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(n, !1, !0, !1), this.yieldPos = u, this.awaitPos = s, this.awaitIdentPos = o, this.finishNode(n, "FunctionExpression");
|
|
8030
8030
|
};
|
|
8031
8031
|
x.parseArrowExpression = function(e, t, i, n) {
|
|
8032
8032
|
var u = this.yieldPos, s = this.awaitPos, o = this.awaitIdentPos;
|
|
8033
8033
|
return this.enterScope(ii(i, !1) | ti), this.initFunction(e), this.options.ecmaVersion >= 8 && (e.async = !!i), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, e.params = this.toAssignableList(t, !0), this.parseFunctionBody(e, !0, !1, n), this.yieldPos = u, this.awaitPos = s, this.awaitIdentPos = o, this.finishNode(e, "ArrowFunctionExpression");
|
|
8034
8034
|
};
|
|
8035
8035
|
x.parseFunctionBody = function(e, t, i, n) {
|
|
8036
|
-
var u = t && this.type !==
|
|
8036
|
+
var u = t && this.type !== l.braceL, s = this.strict, o = !1;
|
|
8037
8037
|
if (u)
|
|
8038
8038
|
e.body = this.parseMaybeAssign(n), e.expression = !0, this.checkParams(e, !1);
|
|
8039
8039
|
else {
|
|
8040
8040
|
var a = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e.params);
|
|
8041
8041
|
(!s || a) && (o = this.strictDirective(this.end), o && a && this.raiseRecoverable(e.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
|
|
8042
|
-
var
|
|
8043
|
-
this.labels = [], o && (this.strict = !0), this.checkParams(e, !s && !o && !t && !i && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id, ln), e.body = this.parseBlock(!1, void 0, o && !s), e.expression = !1, this.adaptDirectivePrologue(e.body.body), this.labels =
|
|
8042
|
+
var r = this.labels;
|
|
8043
|
+
this.labels = [], o && (this.strict = !0), this.checkParams(e, !s && !o && !t && !i && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id, ln), e.body = this.parseBlock(!1, void 0, o && !s), e.expression = !1, this.adaptDirectivePrologue(e.body.body), this.labels = r;
|
|
8044
8044
|
}
|
|
8045
8045
|
this.exitScope();
|
|
8046
8046
|
};
|
|
@@ -8062,10 +8062,10 @@ x.parseExprList = function(e, t, i, n) {
|
|
|
8062
8062
|
for (var u = [], s = !0; !this.eat(e); ) {
|
|
8063
8063
|
if (s)
|
|
8064
8064
|
s = !1;
|
|
8065
|
-
else if (this.expect(
|
|
8065
|
+
else if (this.expect(l.comma), t && this.afterTrailingComma(e))
|
|
8066
8066
|
break;
|
|
8067
8067
|
var o = void 0;
|
|
8068
|
-
i && this.type ===
|
|
8068
|
+
i && this.type === l.comma ? o = null : this.type === l.ellipsis ? (o = this.parseSpread(n), n && this.type === l.comma && n.trailingComma < 0 && (n.trailingComma = this.start)) : o = this.parseMaybeAssign(!1, n), u.push(o);
|
|
8069
8069
|
}
|
|
8070
8070
|
return u;
|
|
8071
8071
|
};
|
|
@@ -8082,16 +8082,16 @@ x.parseIdent = function(e) {
|
|
|
8082
8082
|
};
|
|
8083
8083
|
x.parseIdentNode = function() {
|
|
8084
8084
|
var e = this.startNode();
|
|
8085
|
-
return this.type ===
|
|
8085
|
+
return this.type === l.name ? e.name = this.value : this.type.keyword ? (e.name = this.type.keyword, (e.name === "class" || e.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46) && this.context.pop(), this.type = l.name) : this.unexpected(), e;
|
|
8086
8086
|
};
|
|
8087
8087
|
x.parsePrivateIdent = function() {
|
|
8088
8088
|
var e = this.startNode();
|
|
8089
|
-
return this.type ===
|
|
8089
|
+
return this.type === l.privateId ? e.name = this.value : this.unexpected(), this.next(), this.finishNode(e, "PrivateIdentifier"), this.options.checkPrivateFields && (this.privateNameStack.length === 0 ? this.raise(e.start, "Private field '#" + e.name + "' must be declared in an enclosing class") : this.privateNameStack[this.privateNameStack.length - 1].used.push(e)), e;
|
|
8090
8090
|
};
|
|
8091
8091
|
x.parseYield = function(e) {
|
|
8092
8092
|
this.yieldPos || (this.yieldPos = this.start);
|
|
8093
8093
|
var t = this.startNode();
|
|
8094
|
-
return this.next(), this.type ===
|
|
8094
|
+
return this.next(), this.type === l.semi || this.canInsertSemicolon() || this.type !== l.star && !this.type.startsExpr ? (t.delegate = !1, t.argument = null) : (t.delegate = this.eat(l.star), t.argument = this.parseMaybeAssign(e)), this.finishNode(t, "YieldExpression");
|
|
8095
8095
|
};
|
|
8096
8096
|
x.parseAwait = function(e) {
|
|
8097
8097
|
this.awaitPos || (this.awaitPos = this.start);
|
|
@@ -8135,12 +8135,12 @@ we.declareName = function(e, t, i) {
|
|
|
8135
8135
|
this.treatFunctionsAsVar ? n = o.lexical.indexOf(e) > -1 : n = o.lexical.indexOf(e) > -1 || o.var.indexOf(e) > -1, o.functions.push(e);
|
|
8136
8136
|
} else
|
|
8137
8137
|
for (var a = this.scopeStack.length - 1; a >= 0; --a) {
|
|
8138
|
-
var
|
|
8139
|
-
if (
|
|
8138
|
+
var r = this.scopeStack[a];
|
|
8139
|
+
if (r.lexical.indexOf(e) > -1 && !(r.flags & sn && r.lexical[0] === e) || !this.treatFunctionsAsVarInScope(r) && r.functions.indexOf(e) > -1) {
|
|
8140
8140
|
n = !0;
|
|
8141
8141
|
break;
|
|
8142
8142
|
}
|
|
8143
|
-
if (
|
|
8143
|
+
if (r.var.push(e), this.inModule && r.flags & Je && delete this.undefinedExports[e], r.flags & vt)
|
|
8144
8144
|
break;
|
|
8145
8145
|
}
|
|
8146
8146
|
n && this.raiseRecoverable(i, "Identifier '" + e + "' has already been declared");
|
|
@@ -8468,8 +8468,8 @@ A.regexp_eatUncapturingGroup = function(e) {
|
|
|
8468
8468
|
var o = this.regexp_eatModifiers(e);
|
|
8469
8469
|
!i && !o && e.current() === 58 && e.raise("Invalid regular expression modifiers");
|
|
8470
8470
|
for (var a = 0; a < o.length; a++) {
|
|
8471
|
-
var
|
|
8472
|
-
(o.indexOf(
|
|
8471
|
+
var r = o.charAt(a);
|
|
8472
|
+
(o.indexOf(r, a + 1) > -1 || i.indexOf(r) > -1) && e.raise("Duplicate regular expression modifiers");
|
|
8473
8473
|
}
|
|
8474
8474
|
}
|
|
8475
8475
|
}
|
|
@@ -9071,7 +9071,7 @@ typeof Symbol < "u" && (_[Symbol.iterator] = function() {
|
|
|
9071
9071
|
next: function() {
|
|
9072
9072
|
var t = e.getToken();
|
|
9073
9073
|
return {
|
|
9074
|
-
done: t.type ===
|
|
9074
|
+
done: t.type === l.eof,
|
|
9075
9075
|
value: t
|
|
9076
9076
|
};
|
|
9077
9077
|
}
|
|
@@ -9080,7 +9080,7 @@ typeof Symbol < "u" && (_[Symbol.iterator] = function() {
|
|
|
9080
9080
|
_.nextToken = function() {
|
|
9081
9081
|
var e = this.curContext();
|
|
9082
9082
|
if ((!e || !e.preserveSpace) && this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length)
|
|
9083
|
-
return this.finishToken(
|
|
9083
|
+
return this.finishToken(l.eof);
|
|
9084
9084
|
if (e.override)
|
|
9085
9085
|
return e.override(this);
|
|
9086
9086
|
this.readToken(this.fullCharCodeAtPos());
|
|
@@ -9166,15 +9166,15 @@ _.readToken_dot = function() {
|
|
|
9166
9166
|
if (e >= 48 && e <= 57)
|
|
9167
9167
|
return this.readNumber(!0);
|
|
9168
9168
|
var t = this.input.charCodeAt(this.pos + 2);
|
|
9169
|
-
return this.options.ecmaVersion >= 6 && e === 46 && t === 46 ? (this.pos += 3, this.finishToken(
|
|
9169
|
+
return this.options.ecmaVersion >= 6 && e === 46 && t === 46 ? (this.pos += 3, this.finishToken(l.ellipsis)) : (++this.pos, this.finishToken(l.dot));
|
|
9170
9170
|
};
|
|
9171
9171
|
_.readToken_slash = function() {
|
|
9172
9172
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
9173
|
-
return this.exprAllowed ? (++this.pos, this.readRegexp()) : e === 61 ? this.finishOp(
|
|
9173
|
+
return this.exprAllowed ? (++this.pos, this.readRegexp()) : e === 61 ? this.finishOp(l.assign, 2) : this.finishOp(l.slash, 1);
|
|
9174
9174
|
};
|
|
9175
9175
|
_.readToken_mult_modulo_exp = function(e) {
|
|
9176
|
-
var t = this.input.charCodeAt(this.pos + 1), i = 1, n = e === 42 ?
|
|
9177
|
-
return this.options.ecmaVersion >= 7 && e === 42 && t === 42 && (++i, n =
|
|
9176
|
+
var t = this.input.charCodeAt(this.pos + 1), i = 1, n = e === 42 ? l.star : l.modulo;
|
|
9177
|
+
return this.options.ecmaVersion >= 7 && e === 42 && t === 42 && (++i, n = l.starstar, t = this.input.charCodeAt(this.pos + 2)), t === 61 ? this.finishOp(l.assign, i + 1) : this.finishOp(n, i);
|
|
9178
9178
|
};
|
|
9179
9179
|
_.readToken_pipe_amp = function(e) {
|
|
9180
9180
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
@@ -9182,27 +9182,27 @@ _.readToken_pipe_amp = function(e) {
|
|
|
9182
9182
|
if (this.options.ecmaVersion >= 12) {
|
|
9183
9183
|
var i = this.input.charCodeAt(this.pos + 2);
|
|
9184
9184
|
if (i === 61)
|
|
9185
|
-
return this.finishOp(
|
|
9185
|
+
return this.finishOp(l.assign, 3);
|
|
9186
9186
|
}
|
|
9187
|
-
return this.finishOp(e === 124 ?
|
|
9187
|
+
return this.finishOp(e === 124 ? l.logicalOR : l.logicalAND, 2);
|
|
9188
9188
|
}
|
|
9189
|
-
return t === 61 ? this.finishOp(
|
|
9189
|
+
return t === 61 ? this.finishOp(l.assign, 2) : this.finishOp(e === 124 ? l.bitwiseOR : l.bitwiseAND, 1);
|
|
9190
9190
|
};
|
|
9191
9191
|
_.readToken_caret = function() {
|
|
9192
9192
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
9193
|
-
return e === 61 ? this.finishOp(
|
|
9193
|
+
return e === 61 ? this.finishOp(l.assign, 2) : this.finishOp(l.bitwiseXOR, 1);
|
|
9194
9194
|
};
|
|
9195
9195
|
_.readToken_plus_min = function(e) {
|
|
9196
9196
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
9197
|
-
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || Q.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(
|
|
9197
|
+
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || Q.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(l.incDec, 2) : t === 61 ? this.finishOp(l.assign, 2) : this.finishOp(l.plusMin, 1);
|
|
9198
9198
|
};
|
|
9199
9199
|
_.readToken_lt_gt = function(e) {
|
|
9200
9200
|
var t = this.input.charCodeAt(this.pos + 1), i = 1;
|
|
9201
|
-
return t === e ? (i = e === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2, this.input.charCodeAt(this.pos + i) === 61 ? this.finishOp(
|
|
9201
|
+
return t === e ? (i = e === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2, this.input.charCodeAt(this.pos + i) === 61 ? this.finishOp(l.assign, i + 1) : this.finishOp(l.bitShift, i)) : t === 33 && e === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45 ? (this.skipLineComment(4), this.skipSpace(), this.nextToken()) : (t === 61 && (i = 2), this.finishOp(l.relational, i));
|
|
9202
9202
|
};
|
|
9203
9203
|
_.readToken_eq_excl = function(e) {
|
|
9204
9204
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
9205
|
-
return t === 61 ? this.finishOp(
|
|
9205
|
+
return t === 61 ? this.finishOp(l.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) : e === 61 && t === 62 && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(l.arrow)) : this.finishOp(e === 61 ? l.eq : l.prefix, 1);
|
|
9206
9206
|
};
|
|
9207
9207
|
_.readToken_question = function() {
|
|
9208
9208
|
var e = this.options.ecmaVersion;
|
|
@@ -9211,23 +9211,23 @@ _.readToken_question = function() {
|
|
|
9211
9211
|
if (t === 46) {
|
|
9212
9212
|
var i = this.input.charCodeAt(this.pos + 2);
|
|
9213
9213
|
if (i < 48 || i > 57)
|
|
9214
|
-
return this.finishOp(
|
|
9214
|
+
return this.finishOp(l.questionDot, 2);
|
|
9215
9215
|
}
|
|
9216
9216
|
if (t === 63) {
|
|
9217
9217
|
if (e >= 12) {
|
|
9218
9218
|
var n = this.input.charCodeAt(this.pos + 2);
|
|
9219
9219
|
if (n === 61)
|
|
9220
|
-
return this.finishOp(
|
|
9220
|
+
return this.finishOp(l.assign, 3);
|
|
9221
9221
|
}
|
|
9222
|
-
return this.finishOp(
|
|
9222
|
+
return this.finishOp(l.coalesce, 2);
|
|
9223
9223
|
}
|
|
9224
9224
|
}
|
|
9225
|
-
return this.finishOp(
|
|
9225
|
+
return this.finishOp(l.question, 1);
|
|
9226
9226
|
};
|
|
9227
9227
|
_.readToken_numberSign = function() {
|
|
9228
9228
|
var e = this.options.ecmaVersion, t = 35;
|
|
9229
9229
|
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(), ce(t, !0) || t === 92))
|
|
9230
|
-
return this.finishToken(
|
|
9230
|
+
return this.finishToken(l.privateId, this.readWord1());
|
|
9231
9231
|
this.raise(this.pos, "Unexpected character '" + ge(t) + "'");
|
|
9232
9232
|
};
|
|
9233
9233
|
_.getTokenFromCode = function(e) {
|
|
@@ -9238,27 +9238,27 @@ _.getTokenFromCode = function(e) {
|
|
|
9238
9238
|
return this.readToken_dot();
|
|
9239
9239
|
// Punctuation tokens.
|
|
9240
9240
|
case 40:
|
|
9241
|
-
return ++this.pos, this.finishToken(
|
|
9241
|
+
return ++this.pos, this.finishToken(l.parenL);
|
|
9242
9242
|
case 41:
|
|
9243
|
-
return ++this.pos, this.finishToken(
|
|
9243
|
+
return ++this.pos, this.finishToken(l.parenR);
|
|
9244
9244
|
case 59:
|
|
9245
|
-
return ++this.pos, this.finishToken(
|
|
9245
|
+
return ++this.pos, this.finishToken(l.semi);
|
|
9246
9246
|
case 44:
|
|
9247
|
-
return ++this.pos, this.finishToken(
|
|
9247
|
+
return ++this.pos, this.finishToken(l.comma);
|
|
9248
9248
|
case 91:
|
|
9249
|
-
return ++this.pos, this.finishToken(
|
|
9249
|
+
return ++this.pos, this.finishToken(l.bracketL);
|
|
9250
9250
|
case 93:
|
|
9251
|
-
return ++this.pos, this.finishToken(
|
|
9251
|
+
return ++this.pos, this.finishToken(l.bracketR);
|
|
9252
9252
|
case 123:
|
|
9253
|
-
return ++this.pos, this.finishToken(
|
|
9253
|
+
return ++this.pos, this.finishToken(l.braceL);
|
|
9254
9254
|
case 125:
|
|
9255
|
-
return ++this.pos, this.finishToken(
|
|
9255
|
+
return ++this.pos, this.finishToken(l.braceR);
|
|
9256
9256
|
case 58:
|
|
9257
|
-
return ++this.pos, this.finishToken(
|
|
9257
|
+
return ++this.pos, this.finishToken(l.colon);
|
|
9258
9258
|
case 96:
|
|
9259
9259
|
if (this.options.ecmaVersion < 6)
|
|
9260
9260
|
break;
|
|
9261
|
-
return ++this.pos, this.finishToken(
|
|
9261
|
+
return ++this.pos, this.finishToken(l.backQuote);
|
|
9262
9262
|
case 48:
|
|
9263
9263
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
9264
9264
|
if (t === 120 || t === 88)
|
|
@@ -9311,7 +9311,7 @@ _.getTokenFromCode = function(e) {
|
|
|
9311
9311
|
case 63:
|
|
9312
9312
|
return this.readToken_question();
|
|
9313
9313
|
case 126:
|
|
9314
|
-
return this.finishOp(
|
|
9314
|
+
return this.finishOp(l.prefix, 1);
|
|
9315
9315
|
case 35:
|
|
9316
9316
|
return this.readToken_numberSign();
|
|
9317
9317
|
}
|
|
@@ -9344,18 +9344,18 @@ _.readRegexp = function() {
|
|
|
9344
9344
|
this.containsEsc && this.unexpected(s);
|
|
9345
9345
|
var a = this.regexpState || (this.regexpState = new he(this));
|
|
9346
9346
|
a.reset(i, u, o), this.validateRegExpFlags(a), this.validateRegExpPattern(a);
|
|
9347
|
-
var
|
|
9347
|
+
var r = null;
|
|
9348
9348
|
try {
|
|
9349
|
-
|
|
9349
|
+
r = new RegExp(u, o);
|
|
9350
9350
|
} catch {
|
|
9351
9351
|
}
|
|
9352
|
-
return this.finishToken(
|
|
9352
|
+
return this.finishToken(l.regexp, { pattern: u, flags: o, value: r });
|
|
9353
9353
|
};
|
|
9354
9354
|
_.readInt = function(e, t, i) {
|
|
9355
|
-
for (var n = this.options.ecmaVersion >= 12 && t === void 0, u = i && this.input.charCodeAt(this.pos) === 48, s = this.pos, o = 0, a = 0,
|
|
9355
|
+
for (var n = this.options.ecmaVersion >= 12 && t === void 0, u = i && this.input.charCodeAt(this.pos) === 48, s = this.pos, o = 0, a = 0, r = 0, f = t ?? 1 / 0; r < f; ++r, ++this.pos) {
|
|
9356
9356
|
var c = this.input.charCodeAt(this.pos), h = void 0;
|
|
9357
9357
|
if (n && c === 95) {
|
|
9358
|
-
u && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), a === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"),
|
|
9358
|
+
u && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), a === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), r === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), a = c;
|
|
9359
9359
|
continue;
|
|
9360
9360
|
}
|
|
9361
9361
|
if (c >= 97 ? h = c - 97 + 10 : c >= 65 ? h = c - 65 + 10 : c >= 48 && c <= 57 ? h = c - 48 : h = 1 / 0, h >= e)
|
|
@@ -9374,7 +9374,7 @@ _.readRadixNumber = function(e) {
|
|
|
9374
9374
|
var t = this.pos;
|
|
9375
9375
|
this.pos += 2;
|
|
9376
9376
|
var i = this.readInt(e);
|
|
9377
|
-
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i = Nn(this.input.slice(t, this.pos)), ++this.pos) : ce(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(
|
|
9377
|
+
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i = Nn(this.input.slice(t, this.pos)), ++this.pos) : ce(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(l.num, i);
|
|
9378
9378
|
};
|
|
9379
9379
|
_.readNumber = function(e) {
|
|
9380
9380
|
var t = this.pos;
|
|
@@ -9384,11 +9384,11 @@ _.readNumber = function(e) {
|
|
|
9384
9384
|
var n = this.input.charCodeAt(this.pos);
|
|
9385
9385
|
if (!i && !e && this.options.ecmaVersion >= 11 && n === 110) {
|
|
9386
9386
|
var u = Nn(this.input.slice(t, this.pos));
|
|
9387
|
-
return ++this.pos, ce(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(
|
|
9387
|
+
return ++this.pos, ce(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(l.num, u);
|
|
9388
9388
|
}
|
|
9389
9389
|
i && /[89]/.test(this.input.slice(t, this.pos)) && (i = !1), n === 46 && !i && (++this.pos, this.readInt(10), n = this.input.charCodeAt(this.pos)), (n === 69 || n === 101) && !i && (n = this.input.charCodeAt(++this.pos), (n === 43 || n === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")), ce(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
9390
9390
|
var s = uo(this.input.slice(t, this.pos), i);
|
|
9391
|
-
return this.finishToken(
|
|
9391
|
+
return this.finishToken(l.num, s);
|
|
9392
9392
|
};
|
|
9393
9393
|
_.readCodePoint = function() {
|
|
9394
9394
|
var e = this.input.charCodeAt(this.pos), t;
|
|
@@ -9408,7 +9408,7 @@ _.readString = function(e) {
|
|
|
9408
9408
|
break;
|
|
9409
9409
|
n === 92 ? (t += this.input.slice(i, this.pos), t += this.readEscapedChar(!1), i = this.pos) : n === 8232 || n === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (_e(n) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
|
|
9410
9410
|
}
|
|
9411
|
-
return t += this.input.slice(i, this.pos++), this.finishToken(
|
|
9411
|
+
return t += this.input.slice(i, this.pos++), this.finishToken(l.string, t);
|
|
9412
9412
|
};
|
|
9413
9413
|
var _n = {};
|
|
9414
9414
|
_.tryReadTemplateToken = function() {
|
|
@@ -9433,7 +9433,7 @@ _.readTmplToken = function() {
|
|
|
9433
9433
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
|
|
9434
9434
|
var i = this.input.charCodeAt(this.pos);
|
|
9435
9435
|
if (i === 96 || i === 36 && this.input.charCodeAt(this.pos + 1) === 123)
|
|
9436
|
-
return this.pos === this.start && (this.type ===
|
|
9436
|
+
return this.pos === this.start && (this.type === l.template || this.type === l.invalidTemplate) ? i === 36 ? (this.pos += 2, this.finishToken(l.dollarBraceL)) : (++this.pos, this.finishToken(l.backQuote)) : (e += this.input.slice(t, this.pos), this.finishToken(l.template, e));
|
|
9437
9437
|
if (i === 92)
|
|
9438
9438
|
e += this.input.slice(t, this.pos), e += this.readEscapedChar(!0), t = this.pos;
|
|
9439
9439
|
else if (_e(i)) {
|
|
@@ -9464,7 +9464,7 @@ _.readInvalidTemplateToken = function() {
|
|
|
9464
9464
|
break;
|
|
9465
9465
|
// fall through
|
|
9466
9466
|
case "`":
|
|
9467
|
-
return this.finishToken(
|
|
9467
|
+
return this.finishToken(l.invalidTemplate, this.input.slice(this.start, this.pos));
|
|
9468
9468
|
case "\r":
|
|
9469
9469
|
this.input[this.pos + 1] === `
|
|
9470
9470
|
` && ++this.pos;
|
|
@@ -9557,7 +9557,7 @@ _.readWord1 = function() {
|
|
|
9557
9557
|
return e + this.input.slice(i, this.pos);
|
|
9558
9558
|
};
|
|
9559
9559
|
_.readWord = function() {
|
|
9560
|
-
var e = this.readWord1(), t =
|
|
9560
|
+
var e = this.readWord1(), t = l.name;
|
|
9561
9561
|
return this.keywords.test(e) && (t = Gt[e]), this.finishToken(t, e);
|
|
9562
9562
|
};
|
|
9563
9563
|
var so = "8.15.0";
|
|
@@ -9570,7 +9570,7 @@ j.acorn = {
|
|
|
9570
9570
|
getLineInfo: nn,
|
|
9571
9571
|
Node: Et,
|
|
9572
9572
|
TokenType: L,
|
|
9573
|
-
tokTypes:
|
|
9573
|
+
tokTypes: l,
|
|
9574
9574
|
keywordTypes: Gt,
|
|
9575
9575
|
TokContext: ae,
|
|
9576
9576
|
tokContexts: q,
|
|
@@ -9603,24 +9603,24 @@ async function bo(e) {
|
|
|
9603
9603
|
console.info(`⚙️ Processing directory '${u}'...`);
|
|
9604
9604
|
const o = [], a = u.slice(`public/${e}`.length);
|
|
9605
9605
|
t[a === "" ? "/" : a] = o;
|
|
9606
|
-
for (const
|
|
9607
|
-
const f = `${u}/${
|
|
9606
|
+
for (const r of s) {
|
|
9607
|
+
const f = `${u}/${r}`;
|
|
9608
9608
|
try {
|
|
9609
9609
|
const c = await B.stat(f);
|
|
9610
9610
|
if (c.isDirectory()) {
|
|
9611
|
-
const h = await B.readdir(f), d = { childCount: h.length, name:
|
|
9611
|
+
const h = await B.readdir(f), d = { childCount: h.length, name: r, typeId: "folder" };
|
|
9612
9612
|
o.push(d), await i(f, h);
|
|
9613
9613
|
} else {
|
|
9614
|
-
const h = { id: Ln(), lastModifiedAt: c.mtimeMs, name:
|
|
9614
|
+
const h = { id: Ln(), lastModifiedAt: c.mtimeMs, name: r, size: c.size, typeId: "object" };
|
|
9615
9615
|
o.push(h);
|
|
9616
9616
|
}
|
|
9617
9617
|
} catch (c) {
|
|
9618
|
-
throw new Error(`Unable to get information for '${
|
|
9618
|
+
throw new Error(`Unable to get information for '${r}' in 'buildPublicDirectoryIndex'. ${String(c)}`);
|
|
9619
9619
|
}
|
|
9620
9620
|
}
|
|
9621
|
-
o.sort((
|
|
9622
|
-
const c =
|
|
9623
|
-
return c === 0 ?
|
|
9621
|
+
o.sort((r, f) => {
|
|
9622
|
+
const c = r.typeId.localeCompare(f.typeId);
|
|
9623
|
+
return c === 0 ? r.name.localeCompare(f.name) : c;
|
|
9624
9624
|
});
|
|
9625
9625
|
}
|
|
9626
9626
|
const n = await B.readdir(`public/${e}`);
|
|
@@ -9631,30 +9631,39 @@ async function bo(e) {
|
|
|
9631
9631
|
}
|
|
9632
9632
|
async function ko() {
|
|
9633
9633
|
try {
|
|
9634
|
-
let e = function(d) {
|
|
9635
|
-
d.type === "FunctionDeclaration" ? console.log("function", d) : d.type === "MethodDefinition" && console.log("method", d);
|
|
9636
|
-
};
|
|
9637
9634
|
console.info("🚀 Building connector configuration...");
|
|
9638
|
-
const
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
|
|
9643
|
-
|
|
9644
|
-
|
|
9645
|
-
|
|
9646
|
-
|
|
9647
|
-
|
|
9648
|
-
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9635
|
+
const e = JSON.parse(await B.readFile("package.json", "utf8")), t = JSON.parse(await B.readFile("config.json", "utf8")), i = await B.readFile("src/index.ts", "utf8");
|
|
9636
|
+
try {
|
|
9637
|
+
const f = oo(i, { ecmaVersion: 2020, sourceType: "module" });
|
|
9638
|
+
Vn(f, {
|
|
9639
|
+
FunctionDeclaration(c) {
|
|
9640
|
+
console.log("function", c);
|
|
9641
|
+
},
|
|
9642
|
+
MethodDefinition(c) {
|
|
9643
|
+
console.log("method", c);
|
|
9644
|
+
}
|
|
9645
|
+
});
|
|
9646
|
+
} catch (f) {
|
|
9647
|
+
console.log(1111, f);
|
|
9648
|
+
}
|
|
9649
|
+
try {
|
|
9650
|
+
let f = function(h) {
|
|
9651
|
+
h.type === "FunctionDeclaration" ? console.log("function", h) : h.type === "MethodDefinition" && console.log("method", h);
|
|
9652
|
+
};
|
|
9653
|
+
const c = Cs(i, { next: !0, module: !0 });
|
|
9654
|
+
f(c);
|
|
9655
|
+
} catch (f) {
|
|
9656
|
+
console.log(2222, f);
|
|
9657
|
+
}
|
|
9658
|
+
let n = !1, u = !1;
|
|
9659
|
+
const s = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, o = [...i.matchAll(s)].filter((f) => f[1] == null && f[2] !== "constructor"), a = [];
|
|
9660
|
+
for (const f of o) {
|
|
9661
|
+
const c = f[2];
|
|
9662
|
+
a.push(c), ao.includes(c) && (n = !0), ro.includes(c) && (u = !0);
|
|
9654
9663
|
}
|
|
9655
|
-
|
|
9656
|
-
let
|
|
9657
|
-
|
|
9664
|
+
a.length > 0 ? console.info(`ℹ️ Implements ${a.length} operations.`) : console.warn("⚠️ Implements no operations.");
|
|
9665
|
+
let r;
|
|
9666
|
+
u && n ? r = "bidirectional" : u ? r = "source" : n ? r = "destination" : r = "unknown", r === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports ${r} usage.`), e.name != null && (t.id = e.name), t.operations = a, t.usageId = r, e.version != null && (t.version = e.version), await B.writeFile("config.json", JSON.stringify(t, void 0, 4), "utf8"), console.info("✅ Connector configuration built.");
|
|
9658
9667
|
} catch (e) {
|
|
9659
9668
|
console.error("❌ Error building connector configuration.", e);
|
|
9660
9669
|
}
|
|
@@ -9733,9 +9742,9 @@ async function wo() {
|
|
|
9733
9742
|
const w = `https://img.shields.io/badge/OWASP-${C}%20${D.label}-${D.color}`;
|
|
9734
9743
|
o.push(`[](https://data-positioning.github.io/${s.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
9735
9744
|
}
|
|
9736
|
-
const
|
|
9745
|
+
const r = await B.readFile("./README.md", "utf8"), f = r.indexOf(e), c = r.indexOf(t);
|
|
9737
9746
|
(f === -1 || c === -1) && (console.error("❌ OWASP badge markers not found in README.md."), process.exit(1));
|
|
9738
|
-
const h = o.join(" "), d =
|
|
9747
|
+
const h = o.join(" "), d = r.substring(0, f + e.length) + h + r.substring(c);
|
|
9739
9748
|
await B.writeFile("README.md", d, "utf8"), console.info("✅ OWASP dependency check badge(s) inserted into README.md");
|
|
9740
9749
|
} catch (i) {
|
|
9741
9750
|
console.error("❌ Error updating README with OWASP badges:", i), process.exit(1);
|
|
@@ -9769,10 +9778,10 @@ async function xo(e, t) {
|
|
|
9769
9778
|
console.info("🚀 Uploading directory to R2....");
|
|
9770
9779
|
async function i(u, s, o) {
|
|
9771
9780
|
for (const a of o) {
|
|
9772
|
-
const
|
|
9773
|
-
if ((await B.stat(
|
|
9774
|
-
const h = await B.readdir(
|
|
9775
|
-
await i(
|
|
9781
|
+
const r = `${u}/${a}`, f = `${s}/${a}`;
|
|
9782
|
+
if ((await B.stat(r)).isDirectory()) {
|
|
9783
|
+
const h = await B.readdir(r);
|
|
9784
|
+
await i(r, f, h);
|
|
9776
9785
|
} else {
|
|
9777
9786
|
console.info(`⚙️ Uploading '${u}/${a}'...`);
|
|
9778
9787
|
const h = `wrangler r2 object put "datapos-sample-data-eu/${s}/${a}" --file="${u}/${a}" --jurisdiction=eu --remote`, d = await Me(h);
|
|
@@ -9807,11 +9816,11 @@ async function So(e) {
|
|
|
9807
9816
|
async function n(u, s = "") {
|
|
9808
9817
|
const o = await B.readdir(u, { withFileTypes: !0 });
|
|
9809
9818
|
for (const a of o) {
|
|
9810
|
-
const
|
|
9819
|
+
const r = `${u}/${a.name}`, f = s ? `${s}/${a.name}` : a.name;
|
|
9811
9820
|
if (!a.isDirectory()) {
|
|
9812
9821
|
const c = `${e}_${i}/${f}`.replace(/\\/g, "/"), h = a.name.endsWith(".js") ? "application/javascript" : a.name.endsWith(".css") ? "text/css" : "application/octet-stream";
|
|
9813
9822
|
console.info(`⚙️ Uploading '${f}' → '${c}'...`);
|
|
9814
|
-
const { stderr: d } = await Me(`wrangler r2 object put "${c}" --file="${
|
|
9823
|
+
const { stderr: d } = await Me(`wrangler r2 object put "${c}" --file="${r}" --content-type ${h} --jurisdiction=eu --remote`);
|
|
9815
9824
|
if (d) throw new Error(d);
|
|
9816
9825
|
}
|
|
9817
9826
|
}
|